![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <thread.h>
Go to the source code of this file.
Data Structures | |
struct | spinlock_t |
Macros | |
#define | SPIN_LOCK_UNLOCKED { 1 } |
#define | DECLARE_SPIN_LOCK(x) static spinlock_t x = SPIN_LOCK_UNLOCKED; |
#define | barrier() __asm__ __volatile__("" : : : "memory") |
#define | spin_is_locked(x) (*(volatile int *)(&(x)->lock) <= 0) |
#define | spin_unlock_wait(x) do { barrier(); } while (spin_is_locked(x)) |
#define | spin_lock_string |
#define | spin_unlock_string "movl $1,%0" |
Functions | |
static __always_inline void | spin_lock (spinlock_t *lock) |
static __always_inline void | spin_unlock (spinlock_t *lock) |
#define barrier | ( | void | ) | __asm__ __volatile__("" : : : "memory") |
Definition at line 27 of file spinlock.h.
#define DECLARE_SPIN_LOCK | ( | x | ) | static spinlock_t x = SPIN_LOCK_UNLOCKED; |
Definition at line 18 of file spinlock.h.
Definition at line 28 of file spinlock.h.
#define spin_lock_string |
Definition at line 32 of file spinlock.h.
#define SPIN_LOCK_UNLOCKED { 1 } |
Definition at line 16 of file spinlock.h.
#define spin_unlock_string "movl $1,%0" |
Definition at line 47 of file spinlock.h.
#define spin_unlock_wait | ( | x | ) | do { barrier(); } while (spin_is_locked(x)) |
Definition at line 29 of file spinlock.h.
|
static |
Definition at line 50 of file spinlock.h.
References lock(), spin_lock_string, and thread_coop_disable().
|
static |
Definition at line 61 of file spinlock.h.
References lock(), spin_unlock_string, and thread_coop_enable().