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 implementation_defined os_spinlock_t |
Implementation defined spinlock object.
void os_spinlock_destroy | ( | os_spinlock_t * | lock | ) |
Destroy a spinlock, freeing any resources the OS may have allocated.
Callable from: thread context.
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.
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.
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.
lock | spinlock to unlock. | |
int_state | interrupt state to restore. |
Referenced by os_refcount_get(), and os_refcount_put().