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

@ -17,12 +17,13 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/calls/state.internal.h"
#include "libc/thread/posixthread.internal.h"
#include "libc/thread/thread.h"
void __fds_lock(void) {
pthread_mutex_lock(&__fds_lock_obj);
_pthread_mutex_lock(&__fds_lock_obj);
}
void __fds_unlock(void) {
pthread_mutex_unlock(&__fds_lock_obj);
_pthread_mutex_unlock(&__fds_lock_obj);
}