Description
Exclusive ARCs currently use pthread mutexes directly (through lock_and_signal). Blocking on one of these will take the entire sched_loop offline until the mutex can be grabbed.
However, the runtime scheduler knows when a thread blocks on a lock_and_signal's associated condition variable, and can schedule other useful work.
If we built a semaphore on top of lock_and_signal + condition, then the semaphore could be used for mutual exclusion in a way that would let the scheduler do other useful work while a thread is blocked on one. Then it would be less bad to do an O(n) operation inside of an exclusive.
The downside is that no longer would the exclusive be able to pass through a condition variable, such as is needed in newcomm.rs. newcomm.rs is going away, but might something else need it?