Skip to content
Snippets Groups Projects
Commit 5ec8e6d0 authored by Nadav Har'El's avatar Nadav Har'El
Browse files

Condvar: Add mutex->send_lock(wait_record *) method

Add a mutex->send_lock(wait_record *) which is similar to lock(), but
rather than taking the mutex for the current thread it takes it for a
different thread which is already waiting on the given wait_record.

The thread waiting on wait_record is woken with the lock taken for it,
and needs to accept the lock by calling mutex->receive_lock().

This feature will be used in a later patch to enable "wait morphing" -
moving a waiter from a condvar's wait queue to a mutex's wait queue.
parent eceaefaf
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment