This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

nanosleep in locarchive


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]