also start prefering NtDll API. so far: * NtQueryInformationFile * NtClose adds a performance workaround for windows unicode conversion. but that should probably be removed before merging
19 lines
252 B
C
19 lines
252 B
C
#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);
|
|
}
|