Programatic way to determine the contents of struct
pthread_*_t...
Daniel Eischen
deischen at freebsd.org
Wed Sep 19 12:00:38 PDT 2007
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
More information about the freebsd-threads
mailing list