summaryrefslogtreecommitdiff
path: root/.gitignore
diff options
context:
space:
mode:
authorCristian-Bogdan SIRB <cbsirb@gmail.com>2020-02-18 14:28:28 +0200
committerAndreas Kling <kling@serenityos.org>2020-02-26 13:06:40 +0100
commit717cd5015e91495fc28cbbe83576530905047faf (patch)
treea6c4328c16ab96d480b38622cc32e20affe3067f /.gitignore
parent9fcb37ad30f6ba16d35a6e4a65f53f5dd8cbdbcb (diff)
downloadserenity-717cd5015e91495fc28cbbe83576530905047faf.zip
Kernel: Allow process with multiple threads to call exec and exit
This allows a process wich has more than 1 thread to call exec, even from a thread. This kills all the other threads, but it won't wait for them to finish, just makes sure that they are not in a running/runable state. In the case where a thread does exec, the new program PID will be the thread TID, to keep the PID == TID in the new process. This introduces a new function inside the Process class, kill_threads_except_self which is called on exit() too (exit with multiple threads wasn't properly working either). Inside the Lock class, there is the need for a new function, clear_waiters, which removes all the waiters from the Process::big_lock. This is needed since after a exit/exec, there should be no other threads waiting for this lock, the threads should be simply killed. Only queued threads should wait for this lock at this point, since blocked threads are handled in set_should_die.
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions