mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 23:08:31 +00:00
Give up on making clock_nanosleep() precise
Multiple projects I care about make the assumption that this isn't a system call that sleeps for a particular number of nanonseconds, but rather a function that parks processes on kernel scheduler quantums. Anyone who wants the old behavior should use cosmo_clock_nanosleep()
This commit is contained in:
parent
99f0491f04
commit
38bceaeb8f
4 changed files with 150 additions and 109 deletions
|
@ -19,8 +19,8 @@ int timespec_getres(struct timespec *, int) libcesque;
|
|||
int timespec_get(struct timespec *, int) libcesque;
|
||||
|
||||
#ifdef _COSMO_SOURCE
|
||||
/* cosmopolitan libc's non-posix timespec library
|
||||
removed by default due to emacs codebase clash */
|
||||
int sys_clock_nanosleep(int, int, const struct timespec *, struct timespec *);
|
||||
int cosmo_clock_nanosleep(int, int, const struct timespec *, struct timespec *);
|
||||
#define timespec_zero ((struct timespec){0})
|
||||
#define timespec_max ((struct timespec){0x7fffffffffffffff, 999999999})
|
||||
libcesque int timespec_cmp(struct timespec, struct timespec) pureconst;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue