1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:07:35 +00:00

Get rid of the undertaker and have waitpid() be the reaper.

For dead orphans, the scheduler calls reap().
This commit is contained in:
Andreas Kling 2018-11-07 23:59:49 +01:00
parent f792349853
commit 1dbc340da8
6 changed files with 45 additions and 60 deletions

View file

@ -46,7 +46,6 @@ public:
Skip1SchedulerPass,
Skip0SchedulerPasses,
Dead,
Forgiven,
BeingInspected,
BlockedSleep,
BlockedWait,
@ -89,8 +88,6 @@ public:
FileDescriptor* file_descriptor(int fd);
const FileDescriptor* file_descriptor(int fd) const;
static void doHouseKeeping();
void block(Process::State);
void unblock();
@ -163,6 +160,7 @@ public:
static void initialize();
void crash() NORETURN;
static void reap(pid_t);
const TTY* tty() const { return m_tty; }
@ -308,7 +306,6 @@ static inline const char* toString(Process::State state)
case Process::Dead: return "Dead";
case Process::Skip1SchedulerPass: return "Skip1";
case Process::Skip0SchedulerPasses: return "Skip0";
case Process::Forgiven: return "Forgiven";
case Process::BlockedSleep: return "Sleep";
case Process::BlockedWait: return "Wait";
case Process::BlockedRead: return "Read";
@ -322,4 +319,3 @@ extern void block(Process::State);
extern void sleep(DWORD ticks);
extern InlineLinkedList<Process>* g_processes;
extern InlineLinkedList<Process>* g_dead_processes;