11 #define SPIN_LOCK_UNLOCKED (spinlock_t){0} 13 #define spin_lock_init(x) do { *(x) = SPIN_LOCK_UNLOCKED; }while(0) 19 __asm__ __volatile__ (
"1: lwarx %0,0,%1\n" 41 :
"=&r"(ret) :
"r"(pint)
55 :
"=&r"(ret) :
"r"(pint)
102 *p_isr_level =
level;
107 __asm__ __volatile__(
"eieio # spin_unlock": : :
"memory");
114 "eieio # spin_unlock" 125 #define RW_LOCK_UNLOCKED (rwlock_t){0} 127 #define read_lock_init(lp) do { *(lp) = RW_LOCK_UNLOCKED; }while(0) 154 "eieio # read_unlock\n\ 169 "b 2f # write_lock\n\ 180 :
"r"(&rw->
lock),
"r"(-1)
186 __asm__ __volatile__(
"eieio # write_unlock": : :
"memory");
static __inline__ void write_lock(rwlock_t *rw)
Definition: spinlock.h:164
#define _CPU_ISR_Disable(_isr_cookie)
Definition: gx_gfx.c:47
__asm__(".arm\n" ".align 4\n" ".globl co_switch_arm\n" ".globl _co_switch_arm\n" "co_switch_arm:\n" "_co_switch_arm:\n" " stmia r1!, {r4, r5, r6, r7, r8, r9, r10, r11, sp, lr}\n" " ldmia r0!, {r4, r5, r6, r7, r8, r9, r10, r11, sp, pc}\n")
#define _CPU_ISR_Restore(_isr_cookie)
Definition: gx_gfx.c:62
static __inline__ void spin_unlock(spinlock_t *lock)
Definition: spinlock.h:105
vu32 lock
Definition: spinlock.h:122
static __inline__ void spin_lock(spinlock_t *lock)
Definition: spinlock.h:60
static __inline__ u32 atomic_dec(u32 *pint)
Definition: spinlock.h:46
static l_mem atomic(lua_State *L)
Definition: lgc.c:982
Definition: spinlock.h:121
static __inline__ void spin_lock_irqsave(spinlock_t *lock, register u32 *p_isr_level)
Definition: spinlock.h:80
GLint level
Definition: glext.h:6293
static __inline__ void spin_unlock_irqrestore(spinlock_t *lock, register u32 isr_level)
Definition: spinlock.h:111
static __inline__ void read_lock(rwlock_t *rw)
Definition: spinlock.h:129
static __inline__ u32 atomic_inc(u32 *pint)
Definition: spinlock.h:32
vu32 lock
Definition: spinlock.h:8
volatile u32 vu32
32bit unsigned volatile integer
Definition: gctypes.h:29
static __inline__ u32 _test_and_set(u32 *atomic)
Definition: spinlock.h:15
static __inline__ void write_unlock(rwlock_t *rw)
Definition: spinlock.h:184
uint32_t u32
32bit unsigned integer
Definition: gctypes.h:19
static __inline__ void read_unlock(rwlock_t *rw)
Definition: spinlock.h:149