wait_event_interruptible_lock_irq_timeout(9) on Linux
The text 65fd5aa5082a, as Debian 7 (Wheezy) shipped it.
sleep until a condition gets true or a timeout elapses. The condition is checked under the lock. This is expected to be called with the lock taken.