Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Sep 2007 14:36:01 -0400 (EDT)
From:      Daniel Eischen <deischen@freebsd.org>
To:        Sean Chittenden <sean@chittenden.org>
Cc:        threads@freebsd.org
Subject:   Re: Programatic way to determine the contents of struct pthread_*_t...
Message-ID:  <Pine.GSO.4.64.0709191432060.22228@sea.ntplx.net>
In-Reply-To: <22249390-ABCD-4993-977C-02D7AEB0CE69@chittenden.org>
References:  <22249390-ABCD-4993-977C-02D7AEB0CE69@chittenden.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 19 Sep 2007, Sean Chittenden wrote:

> Howdy.  What's the best way to programatically gain access to the contents of 
> the various struct pthread_*_t members?  In OS-X and Linux, the contents are 
> defined in /usr/include/*/_*pthreads.h, but that doesn't appear to be the 
> case for FreeBSD at the moment.  I'm in the process of porting D's Tango 
> runtime to FreeBSD[1] and it appears that due to FreeBSD's multi-thread 
> model, this is a bit problematic.  Is there an obvious (or not so obvious) 
> magic woobie stick that I can shake at this problem?  I'm mostly done with 
> the port at this point, but am a bit perplexed as to how to approach the 
> poking at internals problem since D's runtime environment is possibly tied to 
> my kernel configuration.  Less than keen on that reality.  Can I safely 
> assume that libthr is now king of the hill and isn't about to be dethroned 
> anytime soon?

You can't do that.  The pthread_*_t things are opaque and can
and will change over time.  D or Tango or whatever it is is
severely broken.  Not even Java or Ada need this kind of access.

Now I almost feel like changing the pthread_*_t layouts around
every couple of months ;-)

-- 
DE



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.64.0709191432060.22228>