Date: Mon, 12 May 1997 18:16:37 +0800 From: Peter Wemm <peter@spinner.DIALix.COM> To: Peter Wemm <peter@FreeBSD.ORG> Cc: CVS-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-lib@FreeBSD.ORG Subject: Re: cvs commit: src/lib/libc/gen sleep.c Message-ID: <199705121016.SAA05871@spinner.DIALix.COM> In-Reply-To: Your message of "Mon, 12 May 1997 03:04:58 MST." <199705121004.DAA07686@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Peter Wemm wrote: > peter 97/05/12 03:04:58 > > Modified: lib/libc/gen sleep.c > Log: > Use nanosleep() in all cases, not just in the reentrant libc (_THREAD_SAFE) > version. I was just about to do the same to usleep() when I found a problem. usleep() has a void return, so there's no way to indicate an interrupted usleep(). Both sleep and usleep were coded the same way, ie: sit in a while loop waiting for interrupts until the sigalarm happens. is usleep() supposed to wait the full time even if interrupted? or is the application supposed to do a gettimeofday() to determine how long really passed? -Peter
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199705121016.SAA05871>