mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:04:59 +00:00
LibC: Mark a bunch of functions as cancellation points
This commit is contained in:
parent
899fd74f8e
commit
c85f307e62
15 changed files with 78 additions and 0 deletions
|
@ -11,6 +11,7 @@
|
|||
#include <Kernel/API/TimePage.h>
|
||||
#include <LibTimeZone/TimeZone.h>
|
||||
#include <assert.h>
|
||||
#include <bits/pthread_cancel.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
|
@ -458,6 +459,8 @@ int clock_settime(clockid_t clock_id, struct timespec* ts)
|
|||
|
||||
int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec* requested_sleep, struct timespec* remaining_sleep)
|
||||
{
|
||||
__pthread_maybe_cancel();
|
||||
|
||||
Syscall::SC_clock_nanosleep_params params { clock_id, flags, requested_sleep, remaining_sleep };
|
||||
int rc = syscall(SC_clock_nanosleep, ¶ms);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue