diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2024-03-30 13:33:22 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2024-03-30 13:33:22 +0000 |
commit | b554e4bf625273156d5f5bdd702500651ce638e0 (patch) | |
tree | 342f2794e42c07e24731aa44a329042baf464f3d /sys/arch/alpha | |
parent | c59b9f685fc460fc6481c743b3b9e4e7d9044a70 (diff) |
Prevent a recursion inside wakeup(9) when scheduler tracepoints are enabled.
Tracepoints like "sched:enqueue" and "sched:unsleep" were called from inside
the loop iterating over sleeping threads as part of wakeup_proc(). When such
tracepoints were enabled they could result in another wakeup(9) possibly
corrupting the sleepqueue.
Rewrite wakeup(9) in two stages, first dequeue threads from the sleepqueue then
call setrunnable() and possible tracepoints for each of them.
This requires moving unsleep() outside of setrunnable() because it messes with
the sleepqueue.
ok claudio@
Diffstat (limited to 'sys/arch/alpha')
0 files changed, 0 insertions, 0 deletions