FreeBSD/sys/kern/kern_lockf.c
/*
 * Wake up a sleeping lock and remove it from the pending list now
 * that all its dependencies have been resolved. The caller should
 * arrange for the lock to be added to the active list, adjusting any
 * existing locks for the same owner as needed.
 */
Wake up a sleeping lock and remove it from the pending list now
that all its dependencies have been resolved. The caller should
arrange for the lock to be added to the active list, adjusting any
existing locks for the same owner as needed.
Wake up a sleeping lock and remove it from the pending list now that all its dependencies have been resolved . The caller should arrange for the lock to be added to the active list adjusting any existing locks for the same owner as needed .
static void
lf_wakeup_lock(struct lockf *state, struct lockf_entry *wakelock)
{
	LIST_REMOVE(wakelock, lf_link);
#ifdef LOCKF_DEBUG
	if (lockf_debug & 1)
		lf_print("lf_wakeup_lock: awakening", wakelock);
#endif 
	if (wakelock->lf_async_task) {
		taskqueue_enqueue(taskqueue_thread, wakelock->lf_async_task);
	} else {
		wakeup(wakelock);
	}
}
static void lf_wakeup_lock ( struct lockf * state , struct lockf_entry * wakelock ) { LIST_REMOVE ( wakelock , lf_link ) ; #ifdef LOCKF_DEBUG if ( lockf_debug & 1 ) lf_print ( " " , wakelock ) ; #endif if ( wakelock -> lf_async_task ) { taskqueue_enqueue ( taskqueue_thread , wakelock -> lf_async_task ) ; } else { wakeup ( wakelock ) ; } }
Wake up a sleeping lock and remove it from the pending list now
 that all its dependencies have been resolved.
Wake up a sleeping lock and remove it from the pending list now that all its dependencies have been resolved .
/*
	 * Remove from ls_pending list and wake up the caller
	 * or start the async notification, as appropriate.
	 */ /* LOCKF_DEBUG */