MCPcopy Create free account
hub / github.com/F-Stack/f-stack / kern_umtx_wake

Function kern_umtx_wake

freebsd/kern/kern_umtx.c:968–982  ·  view source on GitHub ↗

* Wake up threads sleeping on the specified address. */

Source from the content-addressed store, hash-verified

966 * Wake up threads sleeping on the specified address.
967 */
968int
969kern_umtx_wake(struct thread *td, void *uaddr, int n_wake, int is_private)
970{
971 struct umtx_key key;
972 int ret;
973
974 if ((ret = umtx_key_get(uaddr, TYPE_SIMPLE_WAIT,
975 is_private ? THREAD_SHARE : AUTO_SHARE, &key)) != 0)
976 return (ret);
977 umtxq_lock(&key);
978 umtxq_signal(&key, n_wake);
979 umtxq_unlock(&key);
980 umtx_key_release(&key);
981 return (0);
982}
983
984/*
985 * Lock PTHREAD_PRIO_NONE protocol POSIX mutex.

Callers 5

__umtx_op_wakeFunction · 0.85
__umtx_op_wake_privateFunction · 0.85
sys_thr_exitFunction · 0.85

Calls 4

umtx_key_getFunction · 0.85
umtxq_lockFunction · 0.85
umtxq_unlockFunction · 0.85
umtx_key_releaseFunction · 0.85

Tested by

no test coverage detected