- ret = wait_queue_assert_wait64_locked(wq, event, interruptible, deadline, thread);
+ ret = wait_queue_assert_wait64_locked(wq, event, interruptible,
+ TIMEOUT_URGENCY_SYS_NORMAL,
+ deadline, 0,
+ thread);
+ thread_unlock(thread);
+ wait_queue_unlock(wq);
+ splx(s);
+ return(ret);
+}
+
+/*
+ * Routine: wait_queue_assert_wait64_with_leeway
+ * Purpose:
+ * Insert the current thread into the supplied wait queue
+ * waiting for a particular event to be posted to that queue.
+ * Deadline values are specified with urgency and leeway.
+ * Conditions:
+ * nothing of interest locked.
+ */
+wait_result_t
+wait_queue_assert_wait64_with_leeway(
+ wait_queue_t wq,
+ event64_t event,
+ wait_interrupt_t interruptible,
+ wait_timeout_urgency_t urgency,
+ uint64_t deadline,
+ uint64_t leeway)
+{
+ spl_t s;
+ wait_result_t ret;
+ thread_t thread = current_thread();
+
+ /* If it is an invalid wait queue, you cant wait on it */
+ if (!wait_queue_is_valid(wq))
+ return (thread->wait_result = THREAD_RESTART);
+
+ s = splsched();
+ wait_queue_lock(wq);
+ thread_lock(thread);
+ ret = wait_queue_assert_wait64_locked(wq, event, interruptible,
+ urgency, deadline, leeway,
+ thread);