Spinlocks


Typedefs

typedef implementation_defined os_spinlock_t

Functions

void os_spinlock_init (os_spinlock_t *lock)
void os_spinlock_destroy (os_spinlock_t *lock)
void os_spinlock_lock_intsave (os_spinlock_t *lock, os_int_status_t *int_state)
void os_spinlock_unlock_intrestore (os_spinlock_t *lock, os_int_status_t *int_state)

Typedef Documentation

typedef implementation_defined os_spinlock_t

Implementation defined spinlock object.


Function Documentation

void os_spinlock_destroy ( os_spinlock_t lock  ) 

Destroy a spinlock, freeing any resources the OS may have allocated.

Callable from: thread context.

Parameters:
lock pointer to the spinlock to destroy.

Referenced by os_refcount_destroy().

void os_spinlock_init ( os_spinlock_t lock  ) 

Initialize a spinlock.

Callable from: thread context.

Parameters:
lock pointer to the spinlock to initialize.

Referenced by os_refcount_init().

void os_spinlock_lock_intsave ( os_spinlock_t lock,
os_int_status_t *  int_state 
)

Lock a spinlock and disable interrupts (after saving the interrupt state).

Callable from: any context.

Parameters:
lock pointer to the spinlock to lock.
int_state for saved interrupt state.

Referenced by os_refcount_get(), and os_refcount_put().

void os_spinlock_unlock_intrestore ( os_spinlock_t lock,
os_int_status_t *  int_state 
)

Unlock a spinlock, restoring the prior interrupt state.

Callable from: any context.

Parameters:
lock spinlock to unlock.
int_state interrupt state to restore.

Referenced by os_refcount_get(), and os_refcount_put().


Generated on Wed Oct 27 15:14:03 2010 for oska by  doxygen 1.5.5