FreeBSD/sys/kern/kern_umtx.c
/*
 * Wake up threads sleeping on the specified address.
 */
Wake up threads sleeping on the specified address.
Wake up threads sleeping on the specified address .
int
kern_umtx_wake(struct thread *td, void *uaddr, int n_wake, int is_private)
{
	struct umtx_key key;
	int ret;
	if ((ret = umtx_key_get(uaddr, TYPE_SIMPLE_WAIT,
	    is_private ? THREAD_SHARE : AUTO_SHARE, &key)) != 0)
		return (ret);
	umtxq_lock(&key);
	umtxq_signal(&key, n_wake);
	umtxq_unlock(&key);
	umtx_key_release(&key);
	return (0);
}
int kern_umtx_wake ( struct thread * td , void * uaddr , int n_wake , int is_private ) { struct umtx_key key ; int ret ; if ( ( ret = umtx_key_get ( uaddr , TYPE_SIMPLE_WAIT , is_private ? THREAD_SHARE : AUTO_SHARE , & key ) ) != 0 ) return ( ret ) ; umtxq_lock ( & key ) ; umtxq_signal ( & key , n_wake ) ; umtxq_unlock ( & key ) ; umtx_key_release ( & key ) ; return ( 0 ) ; }
Wake up threads sleeping on the specified address.
Wake up threads sleeping on the specified address .