mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-05 04:02:28 +00:00
Allow user to override pthread mutex and cond
This commit is contained in:
parent
4705705548
commit
55b7aa1632
54 changed files with 216 additions and 102 deletions
|
@ -38,6 +38,20 @@
|
|||
#include "libc/thread/thread.h"
|
||||
#include "libc/time.h"
|
||||
|
||||
// test ability of user to override pthread mutex api
|
||||
int pthread_mutex_lock(pthread_mutex_t *mutex) {
|
||||
abort();
|
||||
}
|
||||
int pthread_mutex_unlock(pthread_mutex_t *mutex) {
|
||||
abort();
|
||||
}
|
||||
int pthread_mutex_trylock(pthread_mutex_t *mutex) {
|
||||
abort();
|
||||
}
|
||||
int pthread_mutex_wipe_np(pthread_mutex_t *mutex) {
|
||||
abort();
|
||||
}
|
||||
|
||||
FILE *f;
|
||||
char buf[32];
|
||||
|
||||
|
|
|
@ -51,6 +51,20 @@
|
|||
#include "libc/thread/thread.h"
|
||||
#include "libc/thread/thread2.h"
|
||||
|
||||
// test ability of user to override pthread mutex api
|
||||
int pthread_mutex_lock(pthread_mutex_t *mutex) {
|
||||
abort();
|
||||
}
|
||||
int pthread_mutex_unlock(pthread_mutex_t *mutex) {
|
||||
abort();
|
||||
}
|
||||
int pthread_mutex_trylock(pthread_mutex_t *mutex) {
|
||||
abort();
|
||||
}
|
||||
int pthread_mutex_wipe_np(pthread_mutex_t *mutex) {
|
||||
abort();
|
||||
}
|
||||
|
||||
void OnUsr1(int sig, siginfo_t *si, void *vctx) {
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue