Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Dec 1997 20:56:35 -0600 (CST)
From:      Jacques Vidrine <nectar@NECTAR.COM>
To:        "Daniel M. Eischen" <deischen@iworks.interworks.org>
Cc:        Arjan.deVet@adv.IAEhv.nl, freebsd-hackers@freebsd.org
Subject:   Re: pthreads
Message-ID:  <Pine.BSF.3.96.971201205413.20568A-100000@kai.communique.net>
In-Reply-To: <199712012353.RAA04567@iworks.InterWorks.org>

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

Python 1.5b1 doesn't work on -current dated 11/21.  :-(

Thanks for the feedback, though.  I was uncertain of whether I wanted to
delve into getting thread support working with Python because I didn't
know if it had a chance. :-)  But this weekend I'll use your comments
(and hopefully those of others) to get in a bit deeper.

Jacques Vidrine <n@nectar.com>

On Mon, 1 Dec 1997, Daniel M. Eischen wrote:

> I have some experience in getting an application working with pthreads.
> I ported the GNAT (Ada95) compiler to FreeBSD which uses pthreads for
> tasking.  Until recently (last week), FreeBSD pthreads returned non-standard
> error codes.  The POSIX spec specifies that the error codes should (shall)
> be returned to the caller as the return value from the pthread function call.
> FreeBSD was returning -1, and setting the thread-safe errno to the error
> code.
> 
> For instance, a timedout call to pthread_cond_timedwait() would return -1
> and set errno to EAGAIN, instead of returning ETIMEDOUT and leaving errno
> untouched.  GNAT uses pthread_cond_timedwait as its mechanism for performing
> tasking delays and other timed operations.  Until I accounted for this
> non-standard operation, GNAT tasking would not work properly.
> 
> If you've got access to a -current box, try squid or python on there
> with the changes to pthreads.  Or, you can search for all pthread
> calls and see if they are relying on error codes being returned from
> the calls.  It is easy enough to search the pthread source in
> lib/libc_r/uthread/... to see exactly what FreeBSD is returning.
> 
> Note if you are able to make Squid or Python work with our pthreads,
> it'd be nice to make it work for both the standard and non-standard
> versions :-)
> 
> Dan Eischen
> deischen@iworks.InterWorks.org
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.971201205413.20568A-100000>