Wait until all futexes are available?
Wait until all futexes are available?
Posted Jun 20, 2020 1:12 UTC (Sat) by itsmycpu (guest, #139639)In reply to: Wait until all futexes are available? by glenn
Parent article: Rethinking the futex API
> Has any thought been given to waiting until _all_ the futexes are available?
> Some sorting of mutexes could be imparted to avoid deadlock issues.
> Yes, these locks can be obtained serially in userspace, but this may result in as many as N-1 pointless wake-ups of N futexes are needed.
> Some sorting of mutexes could be imparted to avoid deadlock issues.
> Yes, these locks can be obtained serially in userspace, but this may result in as many as N-1 pointless wake-ups of N futexes are needed.
This problem relates to a specific approach, not to user space solutions in general. The goal is to determine contention without any kernel call at all.
The way you ask this question suggests that your life doesn't depend on the answer.
My suggestion: keep it that way.
