From owner-freebsd-hackers Wed Dec 29 16:43:57 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from scientia.demon.co.uk (scientia.demon.co.uk [212.228.14.13]) by hub.freebsd.org (Postfix) with ESMTP id 03F4914C9A for ; Wed, 29 Dec 1999 16:43:55 -0800 (PST) (envelope-from ben@scientia.demon.co.uk) Received: from strontium.scientia.demon.co.uk ([192.168.91.36] ident=ben) by scientia.demon.co.uk with smtp (Exim 3.092 #1) id 123TgI-000EJG-00; Thu, 30 Dec 1999 00:43:06 +0000 Date: Thu, 30 Dec 1999 00:43:06 +0000 From: Ben Smithurst To: Daniel O'Connor Cc: Ken Bolingbroke , freebsd-hackers@FreeBSD.ORG, Steffen Merkel Subject: Re: Sorry, but another thread problem! Message-ID: <19991230004306.B52554@strontium.scientia.demon.co.uk> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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