Sign in
mojo
/
mojo-tools
/
96b05c1cc252cbd1582be4b8c554e72024938f3c
/
.
/
fusl
/
src
/
thread
/
lock_ptc.c
blob: 7adedab75b93c168efb0a4ce523b27d4452341d3 [
file
] [
log
] [
blame
]
#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
);
}