Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/umtxvar.h
Show First 20 Lines • Show All 113 Lines • ▼ Show 20 Lines | struct umtx_q { | ||||
TAILQ_ENTRY(umtx_q) uq_link; | TAILQ_ENTRY(umtx_q) uq_link; | ||||
/* Umtx key. */ | /* Umtx key. */ | ||||
struct umtx_key uq_key; | struct umtx_key uq_key; | ||||
/* Umtx flags. */ | /* Umtx flags. */ | ||||
int uq_flags; | int uq_flags; | ||||
#define UQF_UMTXQ 0x0001 | #define UQF_UMTXQ 0x0001 | ||||
/* Futex bitset mask */ | |||||
u_int uq_bitset; | |||||
kib: If the field is 32bit mask, then might be uint32_t type is better? It is explicit. | |||||
Not Done Inline ActionsThere is a hole here on LP64, if you add the new field here the size of the structure will not grow. markj: There is a hole here on LP64, if you add the new field here the size of the structure will not… | |||||
Not Done Inline Actionsgood, thanks, will fix it dchagin: good, thanks, will fix it | |||||
/* The thread waits on. */ | /* The thread waits on. */ | ||||
struct thread *uq_thread; | struct thread *uq_thread; | ||||
/* | /* | ||||
* Blocked on PI mutex. read can use chain lock | * Blocked on PI mutex. read can use chain lock | ||||
* or umtx_lock, write must have both chain lock and | * or umtx_lock, write must have both chain lock and | ||||
* umtx_lock being hold. | * umtx_lock being hold. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | |||||
void umtx_key_release(struct umtx_key *); | void umtx_key_release(struct umtx_key *); | ||||
struct umtx_q *umtxq_alloc(void); | struct umtx_q *umtxq_alloc(void); | ||||
void umtxq_busy(struct umtx_key *); | void umtxq_busy(struct umtx_key *); | ||||
int umtxq_count(struct umtx_key *); | int umtxq_count(struct umtx_key *); | ||||
void umtxq_free(struct umtx_q *); | void umtxq_free(struct umtx_q *); | ||||
struct umtxq_chain *umtxq_getchain(struct umtx_key *); | struct umtxq_chain *umtxq_getchain(struct umtx_key *); | ||||
void umtxq_insert_queue(struct umtx_q *, int); | void umtxq_insert_queue(struct umtx_q *, int); | ||||
void umtxq_remove_queue(struct umtx_q *, int); | void umtxq_remove_queue(struct umtx_q *, int); | ||||
int umtxq_signal_mask(struct umtx_key *, int, u_int); | |||||
int umtxq_sleep(struct umtx_q *, const char *, | int umtxq_sleep(struct umtx_q *, const char *, | ||||
struct umtx_abs_timeout *); | struct umtx_abs_timeout *); | ||||
void umtxq_unbusy(struct umtx_key *); | void umtxq_unbusy(struct umtx_key *); | ||||
int kern_umtx_wake(struct thread *, void *, int, int); | int kern_umtx_wake(struct thread *, void *, int, int); | ||||
void umtx_pi_adjust(struct thread *, u_char); | void umtx_pi_adjust(struct thread *, u_char); | ||||
void umtx_thread_init(struct thread *); | void umtx_thread_init(struct thread *); | ||||
void umtx_thread_fini(struct thread *); | void umtx_thread_fini(struct thread *); | ||||
void umtx_thread_alloc(struct thread *); | void umtx_thread_alloc(struct thread *); | ||||
Show All 32 Lines |
If the field is 32bit mask, then might be uint32_t type is better? It is explicit.