Date: Thu, 30 Dec 1999 00:43:06 +0000 From: Ben Smithurst <ben@scientia.demon.co.uk> To: Daniel O'Connor <doconnor@gsoft.com.au> Cc: Ken Bolingbroke <hacker@bolingbroke.com>, freebsd-hackers@FreeBSD.ORG, Steffen Merkel <d_f0rce@gmx.de> Subject: Re: Sorry, but another thread problem! Message-ID: <19991230004306.B52554@strontium.scientia.demon.co.uk> In-Reply-To: <XFMail.991230110857.doconnor@gsoft.com.au> References: <Pine.BSF.4.05.9912291210510.64465-100000@fremont.bolingbroke.com> <XFMail.991230110857.doconnor@gsoft.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
Daniel O'Connor wrote:
> On 29-Dec-99 Ken Bolingbroke wrote:
>> From my own experience, altho I'm not that skilled a programmer,
>> sleep()
>> is not thread-safe. I believe sleep() sets a global SIGALARM, which
>> is
>> reset by every thread that calls it, and thus only the last one ever
>> returns. Replacing sleep() with nanosleep() or something else that
>> is
>> thread-safe should solve that problem.
>
> Stupid question time..
>
> If that is so why doesn't sleep just use nanosleep? :)
It does in FreeBSD. UTSL.
--
Ben Smithurst | PGP: 0x99392F7D
ben@scientia.demon.co.uk | key available from keyservers and
| ben+pgp@scientia.demon.co.uk
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991230004306.B52554>
