Go to the documentation of this file.
29 #ifndef _UBIXOS_SPINLOCK_H
30 #define _UBIXOS_SPINLOCK_H
36 #define SPIN_LOCK_INITIALIZER {NULL, 0}
61 __asm__ __volatile__(
"xchgq %1,%0"
69 __asm__ __volatile__(
"xchgl %1,%0"
77 __asm__ __volatile__(
"xchgw %1,%0"
85 static inline char atomic_bitsetandtest(
void *ptr,
int x) {
87 __asm__ __volatile__(
"lock; bts %2,%1\n"
89 :
"=r" (out),
"=m" (*(
volatile long long *)ptr)
void spinLock_scheduler(spinLock_t *)
void spinUnlock(spinLock_t)
int spinTryLock(spinLock_t)
int spinLockLocked(spinLock_t *)
void spinLockInit(spinLock_t)
struct spinLock * spinLock_t
void spinLock(spinLock_t)