Files
ladybird/Kernel
Itamar 4568a628f9 Thread: Set m_blocker to null in Thread::unblock()
Before this commit, m_blocker was only set to null in Thread::block,
after the thread has been unblocked.

Starting with this commit, m_blocker is also set to null in
Thread::unblock.

This change will allow us to implement a missing feature of the PT_TRACE
command of the ptrace syscall - stopping the traced thread when it
exits the execve syscall.

That feature will be implemented by sending a blocking SIGSTOP to the
traced thread after it has executed the execve logic and before it
starts executing the new program in userspace.

However, since Process::exec arranges the tss to return to userspace
(the so-called "yield-teleport"), the code in Thread::block that should
be run after the thread unblocks, and sets m_blocker to null, never
actually runs.

Setting m_blocker to null in Thread::unblock allows us to avoid an
incorrect state where the thread is in a Running state but conatins a
pointer to a Blocker.
2020-04-13 00:53:22 +02:00
..
2020-04-13 00:53:22 +02:00
2020-04-13 00:53:22 +02:00
2020-01-18 09:45:54 +01:00
2020-03-28 18:27:18 +01:00
2020-01-31 13:13:04 +01:00
2020-04-10 13:09:35 +02:00
2020-03-21 09:46:30 +01:00
2020-04-13 00:53:22 +02:00
2020-01-18 09:45:54 +01:00
2020-03-28 18:27:18 +01:00
2020-04-13 00:53:22 +02:00
2020-04-13 00:53:22 +02:00
2020-04-13 00:53:22 +02:00
2020-04-13 00:53:22 +02:00