diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2005-12-08 14:58:32 +0000 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2005-12-08 14:58:32 +0000 |
commit | dcfc19695c52d291df929f730d9ed38abc8fc2a5 (patch) | |
tree | 00f3a1f33f0f1733e383481907dbe7a1376a1d97 /libc/unistd | |
parent | 3bbbffe5cfada93cd4464e7301c6c3b79ece8412 (diff) |
Do __sleep, should we make it weak, so that libpthread can overwrite it?
Diffstat (limited to 'libc/unistd')
-rw-r--r-- | libc/unistd/sleep.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libc/unistd/sleep.c b/libc/unistd/sleep.c index b704cd905..5d129bd81 100644 --- a/libc/unistd/sleep.c +++ b/libc/unistd/sleep.c @@ -29,7 +29,7 @@ /* This is a quick and dirty, but not 100% compliant with * the stupid SysV SIGCHLD vs. SIG_IGN behaviour. It is * fine unless you are messing with SIGCHLD... */ -unsigned int sleep (unsigned int sec) +unsigned int attribute_hidden __sleep (unsigned int sec) { unsigned int res; struct timespec ts = { .tv_sec = (long int) seconds, .tv_nsec = 0 }; @@ -43,7 +43,7 @@ unsigned int sleep (unsigned int sec) /* We are going to use the `nanosleep' syscall of the kernel. But the kernel does not implement the sstupid SysV SIGCHLD vs. SIG_IGN behaviour for this syscall. Therefore we have to emulate it here. */ -unsigned int sleep (unsigned int seconds) +unsigned int attribute_hidden __sleep (unsigned int seconds) { struct timespec ts = { .tv_sec = (long int) seconds, .tv_nsec = 0 }; sigset_t set, oset; @@ -107,3 +107,4 @@ unsigned int sleep (unsigned int seconds) return result; } #endif +strong_alias(__sleep,sleep) |