public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* nanosleep in locarchive
@ 2002-05-12 15:11 Roland McGrath
  2002-05-14 15:40 ` Ulrich Drepper
  0 siblings, 1 reply; 3+ messages in thread
From: Roland McGrath @ 2002-05-12 15:11 UTC (permalink / raw)
  To: GNU libc hackers

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;
 	}

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-05-15  1:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-12 15:11 nanosleep in locarchive Roland McGrath
2002-05-14 15:40 ` Ulrich Drepper
2002-05-14 18:08   ` Roland McGrath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).