futex_exit_recursive — Set the tasks futex state to FUTEX_STATE_DEAD
void futex_exit_recursive ( | struct task_struct * tsk) ; |
Set the futex exit state of the task lockless. The futex waiter code observes that state when a task is exiting and loops until the task has actually finished the futex cleanup. The worst case for this is that the waiter runs through the wait loop until the state becomes visible.
This is called from the recursive fault handling path in do_exit
.
This is best effort. Either the futex exit code has run already or not. If the OWNER_DIED bit has been set on the futex then the waiter can take it over. If not, the problem is pushed back to user space. If the futex exit code did not run yet, then an already queued waiter might block forever, but there is nothing which can be done about that.