Open Bug 1131943 Opened 5 years ago Updated 2 years ago
Allow code reached from an interrupt handler to futex
This bug pertains to an obscure corner case of futexWait, see eg https://bugzilla.mozilla.org/show_bug.cgi?id=1074237#c40 and nest back from there. I don't want to do the reengineering now so I'm recording it here. The essence is that an interrupt handler, or an event delivered during an interrupt handler (very rare), may invoke futexWait. Right now such a call just throws an exception ("Waiting is not allowed"). It would be better to allow the wait. To do that, we must probably step away from the current handling of waiters, which is one FutexWaiter structure per wait instance, and move to a structure where there is one FutexWaiter per runtime / per PerRuntimeFutexAPI instance. Once such a structure is on the list it remains on the list once. That structure must additionally have a counter saying something about the number of invocations; this allows LIFO wakeup as desired. However there are some fine points around how the structure is moved during futexWakeOrRequeue that I haven't figured out yet, which is why I don't want to do the reengineering now.
You need to log in before you can comment on or make changes to this bug.