svn commit: trunk/uClibc/libc/unistd
psm at uclibc.org
psm at uclibc.org
Thu Dec 8 14:58:52 UTC 2005
Author: psm
Date: 2005-12-08 06:58:32 -0800 (Thu, 08 Dec 2005)
New Revision: 12747
Log:
Do __sleep, should we make it weak, so that libpthread can overwrite it?
Modified:
trunk/uClibc/libc/unistd/sleep.c
Changeset:
Modified: trunk/uClibc/libc/unistd/sleep.c
===================================================================
--- trunk/uClibc/libc/unistd/sleep.c 2005-12-08 14:54:57 UTC (rev 12746)
+++ trunk/uClibc/libc/unistd/sleep.c 2005-12-08 14:58:32 UTC (rev 12747)
@@ -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 @@
/* 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 @@
return result;
}
#endif
+strong_alias(__sleep,sleep)
More information about the uClibc-cvs
mailing list