Fix some todos

This commit is contained in:
Justine Tunney 2023-10-09 23:12:32 -07:00
parent 9d372f48dd
commit 9cc4f33c76
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
13 changed files with 261 additions and 139 deletions

View file

@ -100,7 +100,7 @@ static int cosmo_clock_nanosleep(int clock, int flags,
if (timespec_cmp(remain, quantum) > 0) {
waitfor = timespec_sub(remain, quantum);
if (sys_clock_nanosleep(sleep_clock, 0, &waitfor, rem) == -1) {
if (rem && errno == EINTR) {
if (!flags && rem && errno == EINTR) {
*rem = timespec_add(*rem, quantum);
}
return -1;