Go to the documentation of this file.
7 #ifndef KRK_DISABLE_THREADS
14 #define sched_yield() YieldProcessor()
17 static inline void _krk_internal_spin_lock(
int volatile * lock) {
18 while(__sync_lock_test_and_set(lock, 0x01)) {
23 static inline void _krk_internal_spin_unlock(
int volatile * lock) {
24 __sync_lock_release(lock);
27 #define _obtain_lock(v) _krk_internal_spin_lock(&v);
28 #define _release_lock(v) _krk_internal_spin_unlock(&v);
32 #define _obtain_lock(v)
33 #define _release_lock(v)
35 #define pthread_rwlock_init(a,b) ((void)0)
36 #define pthread_rwlock_wrlock(a) ((void)0)
37 #define pthread_rwlock_rdlock(a) ((void)0)
38 #define pthread_rwlock_unlock(a) ((void)0)