aboutsummaryrefslogtreecommitdiff
path: root/src/thread/lock_ptc.c
blob: 034358979b034eaf99e70987df13822b6ca9b244 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#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);
}


#ifdef TEST
int
main(void) {
	return 0;
}
#endif