mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-02 07:50:31 +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
9
third_party/gdtoa/lock.c
vendored
9
third_party/gdtoa/lock.c
vendored
|
@ -29,6 +29,7 @@
|
|||
│ THIS SOFTWARE. │
|
||||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/thread/posixthread.internal.h"
|
||||
#include "third_party/gdtoa/lock.h"
|
||||
|
||||
pthread_mutex_t __gdtoa_lock_obj = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
@ -37,23 +38,23 @@ pthread_mutex_t __gdtoa_lock1_obj = PTHREAD_MUTEX_INITIALIZER;
|
|||
void
|
||||
__gdtoa_lock(void)
|
||||
{
|
||||
pthread_mutex_lock(&__gdtoa_lock_obj);
|
||||
_pthread_mutex_lock(&__gdtoa_lock_obj);
|
||||
}
|
||||
|
||||
void
|
||||
__gdtoa_unlock(void)
|
||||
{
|
||||
pthread_mutex_unlock(&__gdtoa_lock_obj);
|
||||
_pthread_mutex_unlock(&__gdtoa_lock_obj);
|
||||
}
|
||||
|
||||
void
|
||||
__gdtoa_lock1(void)
|
||||
{
|
||||
pthread_mutex_lock(&__gdtoa_lock1_obj);
|
||||
_pthread_mutex_lock(&__gdtoa_lock1_obj);
|
||||
}
|
||||
|
||||
void
|
||||
__gdtoa_unlock1(void)
|
||||
{
|
||||
pthread_mutex_unlock(&__gdtoa_lock1_obj);
|
||||
_pthread_mutex_unlock(&__gdtoa_lock1_obj);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue