OSDN Git Service

hidden_def/hidden_proto: convert all users (I hope) termios split, add some missing...
[uclinux-h8/uClibc.git] / libc / unistd / sleep.c
index 01a9b64..92944af 100644 (file)
 #include <signal.h>
 #include <unistd.h>
 
+libc_hidden_proto(sleep)
+
+libc_hidden_proto(sigaction)
+libc_hidden_proto(sigprocmask)
+//libc_hidden_proto(__sigaddset)
+//libc_hidden_proto(__sigemptyset)
+//libc_hidden_proto(__sigismember)
+libc_hidden_proto(nanosleep)
+
 #if 0
 /* This is a quick and dirty, but not 100% compliant with
  * the stupid SysV SIGCHLD vs. SIG_IGN behaviour.  It is
@@ -56,7 +65,7 @@ unsigned int sleep (unsigned int seconds)
        in libc.  We block SIGCHLD first.  */
     if (__sigemptyset (&set) < 0
            || __sigaddset (&set, SIGCHLD) < 0
-           || __sigprocmask (SIG_BLOCK, &set, &oset))
+           || sigprocmask (SIG_BLOCK, &set, &oset))
        return -1;
 
     /* If SIGCHLD is already blocked, we don't have to do anything.  */
@@ -73,7 +82,7 @@ unsigned int sleep (unsigned int seconds)
        {
            saved_errno = errno;
            /* Restore the original signal mask.  */
-           (void) __sigprocmask (SIG_SETMASK, &oset, (sigset_t *) NULL);
+           (void) sigprocmask (SIG_SETMASK, &oset, (sigset_t *) NULL);
            __set_errno (saved_errno);
            return -1;
        }
@@ -85,13 +94,13 @@ unsigned int sleep (unsigned int seconds)
 
            saved_errno = errno;
            /* Restore the original signal mask.  */
-           (void) __sigprocmask (SIG_SETMASK, &oset, (sigset_t *) NULL);
+           (void) sigprocmask (SIG_SETMASK, &oset, (sigset_t *) NULL);
            __set_errno (saved_errno);
        }
        else
        {
            /* We should unblock SIGCHLD.  Restore the original signal mask.  */
-           (void) __sigprocmask (SIG_SETMASK, &oset, (sigset_t *) NULL);
+           (void) sigprocmask (SIG_SETMASK, &oset, (sigset_t *) NULL);
            result = nanosleep (&ts, &ts);
        }
     }
@@ -105,3 +114,4 @@ unsigned int sleep (unsigned int seconds)
     return result;
 }
 #endif
+libc_hidden_def(sleep)