Index: sys/kern/kern_umtx.c =================================================================== --- sys/kern/kern_umtx.c +++ sys/kern/kern_umtx.c @@ -166,8 +166,6 @@ static void umtx_shm_init(void); static void umtxq_sysinit(void *); static void umtxq_hash(struct umtx_key *key); -static struct umtx_pi *umtx_pi_alloc(int); -static void umtx_pi_free(struct umtx_pi *pi); static int do_unlock_pp(struct thread *td, struct umutex *m, uint32_t flags, bool rb); static void umtx_thread_cleanup(struct thread *td); @@ -431,7 +429,7 @@ wakeup_one(uc); } -static inline void +void umtxq_unbusy_unlocked(struct umtx_key *key) { @@ -1299,7 +1297,7 @@ return (error); } -static inline struct umtx_pi * +struct umtx_pi * umtx_pi_alloc(int flags) { struct umtx_pi *pi; @@ -1310,7 +1308,7 @@ return (pi); } -static inline void +void umtx_pi_free(struct umtx_pi *pi) { uma_zfree(umtx_pi_zone, pi); @@ -1519,7 +1517,7 @@ /* * Claim ownership of a PI mutex. */ -static int +int umtx_pi_claim(struct umtx_pi *pi, struct thread *owner) { struct umtx_q *uq; @@ -1577,7 +1575,7 @@ /* * Sleep on a PI mutex. */ -static int +int umtxq_sleep_pi(struct umtx_q *uq, struct umtx_pi *pi, uint32_t owner, const char *wmesg, struct umtx_abs_timeout *timo, bool shared) { @@ -1645,7 +1643,7 @@ /* * Add reference count for a PI mutex. */ -static void +void umtx_pi_ref(struct umtx_pi *pi) { @@ -1657,7 +1655,7 @@ * Decrease reference count for a PI mutex, if the counter * is decreased to zero, its memory space is freed. */ -static void +void umtx_pi_unref(struct umtx_pi *pi) { struct umtxq_chain *uc; @@ -1680,7 +1678,7 @@ /* * Find a PI mutex in hash table. */ -static struct umtx_pi * +struct umtx_pi * umtx_pi_lookup(struct umtx_key *key) { struct umtxq_chain *uc; @@ -1700,7 +1698,7 @@ /* * Insert a PI mutex into hash table. */ -static inline void +void umtx_pi_insert(struct umtx_pi *pi) { struct umtxq_chain *uc; Index: sys/sys/umtxvar.h =================================================================== --- sys/sys/umtxvar.h +++ sys/sys/umtxvar.h @@ -215,9 +215,19 @@ int umtxq_signal_mask(struct umtx_key *, int, u_int); int umtxq_sleep(struct umtx_q *, const char *, struct umtx_abs_timeout *); +int umtxq_sleep_pi(struct umtx_q *, struct umtx_pi *, uint32_t, + const char *, struct umtx_abs_timeout *, bool); void umtxq_unbusy(struct umtx_key *); +void umtxq_unbusy_unlocked(struct umtx_key *); int kern_umtx_wake(struct thread *, void *, int, int); void umtx_pi_adjust(struct thread *, u_char); +struct umtx_pi *umtx_pi_alloc(int); +int umtx_pi_claim(struct umtx_pi *, struct thread *); +void umtx_pi_free(struct umtx_pi *); +void umtx_pi_insert(struct umtx_pi *); +struct umtx_pi *umtx_pi_lookup(struct umtx_key *); +void umtx_pi_ref(struct umtx_pi *); +void umtx_pi_unref(struct umtx_pi *); void umtx_thread_init(struct thread *); void umtx_thread_fini(struct thread *); void umtx_thread_alloc(struct thread *);