Changeset View
Changeset View
Standalone View
Standalone View
head/sys/compat/linux/linux_futex.c
Show First 20 Lines • Show All 201 Lines • ▼ Show 20 Lines | struct futex { | ||||
uint32_t *f_uaddr; /* user-supplied value, for debug */ | uint32_t *f_uaddr; /* user-supplied value, for debug */ | ||||
struct umtx_key f_key; | struct umtx_key f_key; | ||||
uint32_t f_refcount; | uint32_t f_refcount; | ||||
uint32_t f_bitset; | uint32_t f_bitset; | ||||
LIST_ENTRY(futex) f_list; | LIST_ENTRY(futex) f_list; | ||||
TAILQ_HEAD(lf_waiting_proc, waiting_proc) f_waiting_proc; | TAILQ_HEAD(lf_waiting_proc, waiting_proc) f_waiting_proc; | ||||
}; | }; | ||||
struct futex_list futex_list; | |||||
#define FUTEX_LOCK(f) mtx_lock(&(f)->f_lck) | #define FUTEX_LOCK(f) mtx_lock(&(f)->f_lck) | ||||
#define FUTEX_LOCKED(f) mtx_owned(&(f)->f_lck) | #define FUTEX_LOCKED(f) mtx_owned(&(f)->f_lck) | ||||
#define FUTEX_UNLOCK(f) mtx_unlock(&(f)->f_lck) | #define FUTEX_UNLOCK(f) mtx_unlock(&(f)->f_lck) | ||||
#define FUTEX_INIT(f) do { \ | #define FUTEX_INIT(f) do { \ | ||||
mtx_init(&(f)->f_lck, "ftlk", NULL, \ | mtx_init(&(f)->f_lck, "ftlk", NULL, \ | ||||
MTX_DUPOK); \ | MTX_DUPOK); \ | ||||
LIN_SDT_PROBE1(futex, futex, create, \ | LIN_SDT_PROBE1(futex, futex, create, \ | ||||
&(f)->f_lck); \ | &(f)->f_lck); \ | ||||
▲ Show 20 Lines • Show All 1,116 Lines • Show Last 20 Lines |