libbb: make msleep() result in only one syscall instead of looping

function                                             old     new   delta
msleep                                                45      52      +7

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2020-12-11 16:48:47 +01:00
parent 56ee576507
commit 030fe31760
3 changed files with 21 additions and 4 deletions

View File

@ -27,7 +27,6 @@ int FAST_FUNC usleep(unsigned usec)
* If a signal has non-default handler, nanosleep returns early.
* Our version of usleep doesn't return early
* if interrupted by such signals:
*
*/
while (nanosleep(&ts, &ts) != 0)
continue;