Sign in
mojo
/
mojo-testing
/
32b469b2d747a647c3def601550f7807607bf387
/
.
/
fusl
/
src
/
thread
/
lock_ptc.c
blob: 3f905f13c2058ff8d03be03776fa6d1c6ddac976 [
file
]
#include
<pthread.h>
static
pthread_rwlock_t
lock
=
PTHREAD_RWLOCK_INITIALIZER
;
void
__inhibit_ptc
()
{
pthread_rwlock_wrlock
(&
lock
);
}
void
__acquire_ptc
()
{
pthread_rwlock_rdlock
(&
lock
);
}
void
__release_ptc
()
{
pthread_rwlock_unlock
(&
lock
);
}