forked from Bananymous/banan-os
Kernel: raise() now force sends signal
This commit is contained in:
parent
879706e6e9
commit
a152d0aac5
|
@ -867,15 +867,7 @@ namespace Kernel
|
||||||
ASSERT(this == &Process::current());
|
ASSERT(this == &Process::current());
|
||||||
|
|
||||||
CriticalScope _;
|
CriticalScope _;
|
||||||
|
Thread::current().handle_signal(-signal);
|
||||||
// FIXME: support raise with signal blocked
|
|
||||||
Thread& current = Thread::current();
|
|
||||||
if (current.add_signal(signal))
|
|
||||||
{
|
|
||||||
current.handle_signal(signal);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ASSERT_NOT_REACHED();
|
ASSERT_NOT_REACHED();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -253,13 +253,17 @@ namespace Kernel
|
||||||
}
|
}
|
||||||
ASSERT(signal <= _SIGMAX);
|
ASSERT(signal <= _SIGMAX);
|
||||||
}
|
}
|
||||||
else
|
else if (signal > 0)
|
||||||
{
|
{
|
||||||
uint64_t full_pending_mask = m_signal_pending_mask | process().m_signal_pending_mask;
|
uint64_t full_pending_mask = m_signal_pending_mask | process().m_signal_pending_mask;
|
||||||
uint64_t mask = 1ull << signal;
|
uint64_t mask = 1ull << signal;
|
||||||
ASSERT(full_pending_mask & mask);
|
ASSERT(full_pending_mask & mask);
|
||||||
ASSERT(!(m_signal_block_mask & mask));
|
ASSERT(!(m_signal_block_mask & mask));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
signal = -signal;
|
||||||
|
}
|
||||||
|
|
||||||
uintptr_t& return_rsp = this->return_rsp();
|
uintptr_t& return_rsp = this->return_rsp();
|
||||||
uintptr_t& return_rip = this->return_rip();
|
uintptr_t& return_rip = this->return_rip();
|
||||||
|
|
Loading…
Reference in New Issue