Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Dec 1999 11:08:57 +1030 (CST)
From:      "Daniel O'Connor" <doconnor@gsoft.com.au>
To:        Ken Bolingbroke <hacker@bolingbroke.com>
Cc:        freebsd-hackers@FreeBSD.ORG, Steffen Merkel <d_f0rce@gmx.de>
Subject:   Re: Sorry, but another thread problem!
Message-ID:  <XFMail.991230110857.doconnor@gsoft.com.au>
In-Reply-To: <Pine.BSF.4.05.9912291210510.64465-100000@fremont.bolingbroke.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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? :)

---
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum


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?XFMail.991230110857.doconnor>