-/* Locks out other threads from Q (with Q's lock) and interrupt
- handlers (by disabling interrupts). */
-void
-intq_lock (struct intq *q)
-{
- ASSERT (!intr_context ());
- ASSERT (!owned_by_current_thread (q));
-
- lock_acquire (&q->lock);
- q->old_level = intr_disable ();
-}
-
-/* Unlocks Q. */
-void
-intq_unlock (struct intq *q)
-{
- ASSERT (!intr_context ());
- ASSERT (owned_by_current_thread (q));
-
- lock_release (&q->lock);
- intr_set_level (q->old_level);
-}
-