summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/sleep.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* sleep(3): don't bypass nanosleep(2) if seconds is zerocheloha2021-01-071-4/+1
| | | | | | | | | | | | | | | | | | | | | | sleep(3) does not call nanosleep(2) if seconds is zero. This is bad. As a simplified interface to nanosleep(2), sleep(3) should delegate all decisions about whether or not to yield the CPU to nanosleep(2). This patch removes the nanosleep(2) bypass from sleep(3). This means that this code: sleep(0); will block for up to 1 tick, just like the equivalent nanosleep(2) call. Neither FreeBSD nor NetBSD bypass nanosleep(2) in the zero case, so this commit brings our sleep(3) closer to theirs in behavior. As an added bonus, sleep(3) will now *always* appear in a ktrace(1) as a call to nanosleep(2). ok millert@
* sleep(3) is supposed to return zero when it sleeps the entire amountguenther2009-12-141-3/+3
| | | | ok deraadt@
* zap remaining rcsid.espie2005-08-081-4/+1
| | | | | | Kill old files that are no longer compiled. okay theo
* ansify function definitions and zap some `register'jfb2004-05-181-3/+2
| | | | ok millert@
* pull in headersderaadt2003-06-251-1/+2
|
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* Use nanosleep(2)tholo1997-04-251-82/+9
|
* if interrupted, return time unslept; from phil nelsonderaadt1996-09-301-3/+4
|
* Remove dead codetholo1996-09-151-3/+5
| | | | | | Remove unused variables Silence some warnings lint(1) is your friend
* Fix RCS idstholo1996-08-191-7/+1
| | | | Make sure everything uses {SYS,}LIBC_SCCS properly
* signal mask repair, netbsd pr#2442deraadt1996-05-261-9/+4
|
* Eliminate race by stopping timer before restarting it with remaining timederaadt1995-10-281-7/+25
| | | | (one more system call).
* initial import of NetBSD treederaadt1995-10-181-0/+119