1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:48:11 +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:
Andreas Kling 2018-12-03 01:12:26 +01:00
parent 4bc87dc7b9
commit e7cc08226f
10 changed files with 50 additions and 7 deletions

View file

@ -175,6 +175,8 @@ static dword handle(RegisterDump& regs, dword function, dword arg1, dword arg2,
return current->sys$fstat((int)arg1, (Unix::stat*)arg2);
case Syscall::SC_mkdir:
return current->sys$mkdir((const char*)arg1, (mode_t)arg2);
case Syscall::SC_times:
return current->sys$times((Unix::tms*)arg1);
default:
kprintf("<%u> int0x80: Unknown function %u requested {%x, %x, %x}\n", current->pid(), function, arg1, arg2, arg3);
break;