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

Function lf_wakeup_lock

freebsd/kern/kern_lockf.c:1120–1138  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

1118 * existing locks for the same owner as needed.
1119 */
1120static void
1121lf_wakeup_lock(struct lockf *state, struct lockf_entry *wakelock)
1122{
1123
1124 /*
1125 * Remove from ls_pending list and wake up the caller
1126 * or start the async notification, as appropriate.
1127 */
1128 LIST_REMOVE(wakelock, lf_link);
1129#ifdef LOCKF_DEBUG
1130 if (lockf_debug & 1)
1131 lf_print("lf_wakeup_lock: awakening", wakelock);
1132#endif /* LOCKF_DEBUG */
1133 if (wakelock->lf_async_task) {
1134 taskqueue_enqueue(taskqueue_thread, wakelock->lf_async_task);
1135 } else {
1136 wakeup(wakelock);
1137 }
1138}
1139
1140/*
1141 * Re-check all dependent locks and remove edges to locks that we no

Callers 1

lf_update_dependanciesFunction · 0.85

Calls 3

lf_printFunction · 0.85
taskqueue_enqueueFunction · 0.85
wakeupFunction · 0.70

Tested by

no test coverage detected