RetroArch
Classes | Macros | Functions
spinlock.h File Reference
#include <gctypes.h>
#include <lwp_threads.h>
Include dependency graph for spinlock.h:

Go to the source code of this file.

Classes

struct  spinlock_t
 
struct  rwlock_t
 

Macros

#define SPIN_LOCK_UNLOCKED   (spinlock_t){0}
 
#define spin_lock_init(x)   do { *(x) = SPIN_LOCK_UNLOCKED; }while(0)
 
#define RW_LOCK_UNLOCKED   (rwlock_t){0}
 
#define read_lock_init(lp)   do { *(lp) = RW_LOCK_UNLOCKED; }while(0)
 

Functions

static __inline__ u32 _test_and_set (u32 *atomic)
 
static __inline__ u32 atomic_inc (u32 *pint)
 
static __inline__ u32 atomic_dec (u32 *pint)
 
static __inline__ void spin_lock (spinlock_t *lock)
 
static __inline__ void spin_lock_irqsave (spinlock_t *lock, register u32 *p_isr_level)
 
static __inline__ void spin_unlock (spinlock_t *lock)
 
static __inline__ void spin_unlock_irqrestore (spinlock_t *lock, register u32 isr_level)
 
static __inline__ void read_lock (rwlock_t *rw)
 
static __inline__ void read_unlock (rwlock_t *rw)
 
static __inline__ void write_lock (rwlock_t *rw)
 
static __inline__ void write_unlock (rwlock_t *rw)
 

Macro Definition Documentation

◆ read_lock_init

#define read_lock_init (   lp)    do { *(lp) = RW_LOCK_UNLOCKED; }while(0)

◆ RW_LOCK_UNLOCKED

#define RW_LOCK_UNLOCKED   (rwlock_t){0}

◆ spin_lock_init

#define spin_lock_init (   x)    do { *(x) = SPIN_LOCK_UNLOCKED; }while(0)

◆ SPIN_LOCK_UNLOCKED

#define SPIN_LOCK_UNLOCKED   (spinlock_t){0}

Function Documentation

◆ _test_and_set()

static __inline__ u32 _test_and_set ( u32 atomic)
static
Here is the call graph for this function:

◆ atomic_dec()

static __inline__ u32 atomic_dec ( u32 pint)
static
Here is the call graph for this function:

◆ atomic_inc()

static __inline__ u32 atomic_inc ( u32 pint)
static
Here is the call graph for this function:

◆ read_lock()

static __inline__ void read_lock ( rwlock_t rw)
static
Here is the call graph for this function:

◆ read_unlock()

static __inline__ void read_unlock ( rwlock_t rw)
static
Here is the call graph for this function:

◆ spin_lock()

static __inline__ void spin_lock ( spinlock_t lock)
static
Here is the call graph for this function:

◆ spin_lock_irqsave()

static __inline__ void spin_lock_irqsave ( spinlock_t lock,
register u32 p_isr_level 
)
static
Here is the call graph for this function:

◆ spin_unlock()

static __inline__ void spin_unlock ( spinlock_t lock)
static
Here is the call graph for this function:

◆ spin_unlock_irqrestore()

static __inline__ void spin_unlock_irqrestore ( spinlock_t lock,
register u32  isr_level 
)
static
Here is the call graph for this function:

◆ write_lock()

static __inline__ void write_lock ( rwlock_t rw)
static
Here is the call graph for this function:

◆ write_unlock()

static __inline__ void write_unlock ( rwlock_t rw)
static
Here is the call graph for this function: