3 ms·
It could be (b) -- it's incorrect because there's a deadlock due to incorrect mutex usage here. It could also be (c) -- it's correct but there's contention or:
by wyldfire 7y ago
It could be (b) -- it's incorrect because there's a deadlock due to incorrect mutex usage here.
It could also be (c) -- it's correct but there's contention or: the mutex is too coarse / there's "too much" work being protected by the mutex.
But I think your point about matching windows is likely the case (this is how wine implements WaitForMultipleObjects maybe?). The fd exhaustion with FUTEX_FD means they need another way.
- pjc50 7y agoYes, it looks exactly like WaitForMultipleObjects to me. A very reasonable plan. The mutexs aren't being used to exclude critical sections but as completion indicators for various tasks.