* 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. */
| 1118 | * existing locks for the same owner as needed. |
| 1119 | */ |
| 1120 | static void |
| 1121 | lf_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 |
no test coverage detected