OSDN Git Service

sleep: code shrink
authorDenys Vlasenko <dvlasenk@redhat.com>
Thu, 21 Oct 2010 16:19:35 +0000 (18:19 +0200)
committerDenys Vlasenko <dvlasenk@redhat.com>
Thu, 21 Oct 2010 16:19:35 +0000 (18:19 +0200)
commitc403e32526bc99e886d58a09e11a4f3043af8040
tree4a423b43c92dc9836865a32cb5cb053ece5ac118
parent71dcf8f4401b27f2b7446601a6d0dbcddc0aa8b4
sleep: code shrink

Use less stack by using same "sigset_t set" object for new and saved
signal set, remove redundant clearing of set, and do not save/restore
errno around sigprocmask(SIG_SETMASK) - it never changes it.

While at it, improve comments and make code style consistent
across sleep.c file.

    text           data     bss     dec     hex filename
-    242              0       0     242      f2 libc/unistd/sleep.o
+    197              0       0     197      c5 libc/unistd/sleep.o

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
libc/unistd/sleep.c
libc/unistd/usleep.c