Allow user to override pthread mutex and cond

This commit is contained in:
Justine Tunney 2024-12-23 21:57:52 -08:00
parent 4705705548
commit 55b7aa1632
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
54 changed files with 216 additions and 102 deletions

View file

@ -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];

View file

@ -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) {
}