Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Aug 1998 02:24:53 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        doconnor@gsoft.com.au (Daniel O'Connor)
Cc:        tlambert@primenet.com, dag-erli@ifi.uio.no, kaleb@ics.com, hackers@FreeBSD.ORG
Subject:   Re: Threaded X libs..
Message-ID:  <199808050224.TAA02476@usr02.primenet.com>
In-Reply-To: <199808050026.JAA11671@cain.gsoft.com.au> from "Daniel O'Connor" at Aug 5, 98 09:56:22 am

next in thread | previous in thread | raw e-mail | index | archive | help
> > And working Draft 4 compliant threads since 2.2.6-stable.  8-).
> > Although PTHREAD_MUTEX_INITIALIZER is now supported, I'm pretty
> > sure 2.2.7 and 3.0-current aren't Draft 10/standard compliant yet.
>
> Hmm.. where could I find information on Draft xx standard? It would
> be nice to have a yardstick to measure the implementation by :)

Join a POSIX committee.  8-).

The information is available in the O'Reilly Pthreads book, which has
a section on the differences between the standard and Draft 4.

The lack of PTHREAD_MUTEX_INITIALIZER generally indicates a
Draft 4 implementation (the most widely implemented Draft,
other than Draft 10, which is what was standardized).  The bad
thing about this is that if FreeBSD is not full standard, then
things are not very nice; much code has been written using:

#ifndef PTHREAD_MUTEX_INITIALIZER
	/* use Draft 4 semantics and calling conventsion*/
#else
	/* use Standard semantics and calling conventsion*/
#endif

If FreeBSD is not full Standard, than this code will now break; the
PTHREAD_MUTEX_INITIALIZER (and the attr argument to pthread_create)
should have been the last things changes when Standard compliance
became reality).  8-(.


> I got the patched MIT threads library which has more of the standard 
> implemented.. Now to rebuild XFree86 against it (urgh..)

Bad plan.  The default FreeBSD libc is not threads safe for user space
threads.  This means that the code will appear to work, but won't really
work.  The FreeBSD libc_r overrides system call definitions, as well,
instead of merely adding pthreads functions.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.

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?199808050224.TAA02476>