mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-11 07:19:20 +00:00
Rework signal handling code
This commit is contained in:
@ -64,7 +64,7 @@ namespace Tasking
|
||||
{
|
||||
int TCB::SendSignal(int sig)
|
||||
{
|
||||
return this->Parent->Signals->SendSignal(sig);
|
||||
return this->Parent->Signals.SendSignal((enum Signals)sig, {0}, this->ID);
|
||||
}
|
||||
|
||||
void TCB::SetState(TaskState state)
|
||||
@ -420,6 +420,7 @@ namespace Tasking
|
||||
TaskArchitecture Architecture,
|
||||
TaskCompatibility Compatibility,
|
||||
bool ThreadNotReady)
|
||||
: Signals(Parent->Signals)
|
||||
{
|
||||
debug("+ %#lx", this);
|
||||
|
||||
@ -440,6 +441,14 @@ namespace Tasking
|
||||
this->ctx = ctx;
|
||||
this->ID = (TID)this->Parent->ID + (TID)this->Parent->Threads.size();
|
||||
|
||||
if (Compatibility == TaskCompatibility::Linux)
|
||||
{
|
||||
if (Parent->Threads.size() == 0)
|
||||
this->Linux.tgid = Parent->ID;
|
||||
else
|
||||
this->Linux.tgid = Parent->Threads.front()->Linux.tgid;
|
||||
}
|
||||
|
||||
if (this->Name)
|
||||
delete[] this->Name;
|
||||
|
||||
|
Reference in New Issue
Block a user