public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Roland McGrath <roland@frob.com>
To: GNU libc hackers <libc-hacker@sources.redhat.com>
Subject: nanosleep in locarchive
Date: Sun, 12 May 2002 15:11:00 -0000	[thread overview]
Message-ID: <20020512221059.4861F1BA17@perdition.linnaean.org> (raw)

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

             reply	other threads:[~2002-05-12 22:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-12 15:11 Roland McGrath [this message]
2002-05-14 15:40 ` Ulrich Drepper
2002-05-14 18:08   ` Roland McGrath

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020512221059.4861F1BA17@perdition.linnaean.org \
    --to=roland@frob.com \
    --cc=libc-hacker@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).