mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-07 00:56:14 +00:00
Implement basic support for times().
The kernel now bills processes for time spent in kernelspace and userspace separately. The accounting is forwarded to the parent process in reap(). This makes the "time" builtin in bash work.
This commit is contained in:
@@ -172,6 +172,7 @@ public:
|
||||
int sys$fcntl(int fd, int cmd, dword extra_arg);
|
||||
int sys$ioctl(int fd, unsigned request, unsigned arg);
|
||||
int sys$mkdir(const char* pathname, mode_t mode);
|
||||
Unix::clock_t sys$times(Unix::tms*);
|
||||
|
||||
static void initialize();
|
||||
|
||||
@@ -187,6 +188,12 @@ public:
|
||||
void did_schedule() { ++m_timesScheduled; }
|
||||
dword timesScheduled() const { return m_timesScheduled; }
|
||||
|
||||
dword m_ticks_in_user { 0 };
|
||||
dword m_ticks_in_kernel { 0 };
|
||||
|
||||
dword m_ticks_in_user_for_dead_children { 0 };
|
||||
dword m_ticks_in_kernel_for_dead_children { 0 };
|
||||
|
||||
pid_t waitee_pid() const { return m_waitee_pid; }
|
||||
|
||||
dword framePtr() const { return m_tss.ebp; }
|
||||
|
||||
Reference in New Issue
Block a user