nanosleep in locarchive
Roland McGrath
roland@frob.com
Sun May 12 15:11:00 GMT 2002
Any objection to this change? (On Hurd we have usleep but not nanosleep.
This call doesn't need the finer granularity.)
2002-05-12 Roland McGrath <roland@frob.com>
* locale/programs/locarchive.c (open_archive): Use usleep in place of
nanosleep.
Index: locarchive.c
===================================================================
RCS file: /cvs/glibc/libc/locale/programs/locarchive.c,v
retrieving revision 1.3
diff -u -b -p -r1.3 locarchive.c
--- locarchive.c 1 May 2002 17:05:53 -0000 1.3
+++ locarchive.c 12 May 2002 22:08:22 -0000
@@ -377,9 +377,7 @@ open_archive (struct locarhandle *ah)
struct timespec req;
/* Wait for a bit. */
- req.tv_sec = 0;
- req.tv_nsec = 1000000 * (random () % 500 + 1);
- (void) nanosleep (&req, NULL);
+ (void) usleep (1000 * (random () % 500 + 1));
goto again;
}
More information about the Libc-hacker
mailing list