mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 08:07:45 +00:00
Kernel: Use Userspace<T> for the clock_gettime syscall
This commit is contained in:
parent
48d9f3c2e6
commit
b4d04fd8d1
2 changed files with 3 additions and 4 deletions
|
@ -29,14 +29,13 @@
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
int Process::sys$clock_gettime(clockid_t clock_id, timespec* user_ts)
|
||||
int Process::sys$clock_gettime(clockid_t clock_id, Userspace<timespec*> user_ts)
|
||||
{
|
||||
REQUIRE_PROMISE(stdio);
|
||||
if (!validate_write_typed(user_ts))
|
||||
return -EFAULT;
|
||||
|
||||
timespec ts;
|
||||
memset(&ts, 0, sizeof(ts));
|
||||
timespec ts = {};
|
||||
|
||||
switch (clock_id) {
|
||||
case CLOCK_MONOTONIC:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue