mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 16:27:35 +00:00
Kernel: Don't disable interrupts while exiting a thread or process
This was another vestige from a long time ago, when exiting a thread would mutate global data structures that were only protected by the interrupt flag.
This commit is contained in:
parent
8eeb8db2ed
commit
4aa58aaab5
3 changed files with 0 additions and 4 deletions
|
@ -101,7 +101,6 @@ int handle(RegisterState& regs, u32 function, u32 arg1, u32 arg2, u32 arg3)
|
||||||
process.tracer_trap(*current_thread, regs); // this triggers SIGTRAP and stops the thread!
|
process.tracer_trap(*current_thread, regs); // this triggers SIGTRAP and stops the thread!
|
||||||
}
|
}
|
||||||
|
|
||||||
cli();
|
|
||||||
if (function == SC_exit)
|
if (function == SC_exit)
|
||||||
process.sys$exit((int)arg1);
|
process.sys$exit((int)arg1);
|
||||||
else
|
else
|
||||||
|
|
|
@ -31,8 +31,6 @@ namespace Kernel {
|
||||||
|
|
||||||
void Process::sys$exit(int status)
|
void Process::sys$exit(int status)
|
||||||
{
|
{
|
||||||
cli();
|
|
||||||
|
|
||||||
m_termination_status = status;
|
m_termination_status = status;
|
||||||
m_termination_signal = 0;
|
m_termination_signal = 0;
|
||||||
die();
|
die();
|
||||||
|
|
|
@ -98,7 +98,6 @@ int Process::sys$create_thread(void* (*entry)(void*), Userspace<const Syscall::S
|
||||||
void Process::sys$exit_thread(Userspace<void*> exit_value)
|
void Process::sys$exit_thread(Userspace<void*> exit_value)
|
||||||
{
|
{
|
||||||
REQUIRE_PROMISE(thread);
|
REQUIRE_PROMISE(thread);
|
||||||
cli();
|
|
||||||
|
|
||||||
if (this->thread_count() == 1) {
|
if (this->thread_count() == 1) {
|
||||||
// If this is the last thread, instead kill the process.
|
// If this is the last thread, instead kill the process.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue