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

* Re: nanosleep in locarchive
  2002-05-12 15:11 nanosleep in locarchive Roland McGrath
@ 2002-05-14 15:40 ` Ulrich Drepper
  2002-05-14 18:08   ` Roland McGrath
  0 siblings, 1 reply; 3+ messages in thread
From: Ulrich Drepper @ 2002-05-14 15:40 UTC (permalink / raw)
  To: Roland McGrath; +Cc: GNU libc hackers

[-- Attachment #1: Type: text/plain, Size: 596 bytes --]

On Sun, 2002-05-12 at 15:10, Roland McGrath wrote:
> Any objection to this change?  (On Hurd we have usleep but not nanosleep.
> This call doesn't need the finer granularity.)

This is true t I'd really like to avoid using any but the POSIX
interfaces.  Are there any problems with implementing nanosleep for
Hurd?  The precision does not have to be nanoseconds.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 232 bytes --]

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

* Re: nanosleep in locarchive
  2002-05-14 15:40 ` Ulrich Drepper
@ 2002-05-14 18:08   ` Roland McGrath
  0 siblings, 0 replies; 3+ messages in thread
From: Roland McGrath @ 2002-05-14 18:08 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: GNU libc hackers

Ok, I will just put nanosleep in at some point.

^ 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).