Changes in uspace/lib/posix/source/time.c [78188e5:0d0b319] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/source/time.c
r78188e5 r0d0b319 41 41 42 42 #include "posix/ctype.h" 43 #include "posix/errno.h" 43 44 #include <errno.h> 45 44 46 #include "posix/signal.h" 45 47 #include "posix/assert.h" 46 48 47 #include "libc/ fibril_synch.h"49 #include "libc/async.h" 48 50 #include "libc/malloc.h" 49 51 #include "libc/task.h" … … 100 102 struct tm *restrict result) 101 103 { 102 int rc = time_utc2tm(*timer, result); 103 if (rc != EOK) { 104 errno = rc; 104 if (failed(time_utc2tm(*timer, result))) { 105 105 return NULL; 106 106 } … … 197 197 char *posix_ctime_r(const time_t *timer, char *buf) 198 198 { 199 int r = time_local2str(*timer, buf); 200 if (r != EOK) { 201 errno = r; 199 if (failed(time_local2str(*timer, buf))) { 202 200 return NULL; 203 201 } … … 314 312 // TODO: interruptible sleep 315 313 if (rqtp->tv_sec != 0) { 316 fibril_sleep(rqtp->tv_sec);314 async_sleep(rqtp->tv_sec); 317 315 } 318 316 if (rqtp->tv_nsec != 0) { 319 fibril_usleep(rqtp->tv_nsec / 1000);317 async_usleep(rqtp->tv_nsec / 1000); 320 318 } 321 319 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.