Date: Wed, 28 May 2003 21:10:47 -0400 From: Craig Rodrigues <rodrigc@attbi.com> To: freebsd-threads@freebsd.org Subject: Re: Question about OpenSSL id_function() and pthreads Message-ID: <20030529011047.GA4182@attbi.com> In-Reply-To: <Pine.GSO.4.10.10305282038470.5688-100000@pcnet5.pcnet.com> References: <20030529003416.GA3712@attbi.com> <Pine.GSO.4.10.10305282038470.5688-100000@pcnet5.pcnet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, May 28, 2003 at 08:46:26PM -0400, Daniel Eischen wrote: > > Make an external function (in C) that converts the pthread_t > for you and use that to convert it. How should I do the conversion? On FreeBSD, pthread_t is a pointer to struct pthread. Are there data members in the struct pthread that I can use to construct a unique numeric identifier? > This is a standards question, but is there a reason why > pthread_t can't be a pointer? We can always change the > thread libraries, but that would be a version bump and > doesn't help you right now. There was some discussion about this on freebsd-current in February. See the full thread here: "OpenSSL question for id_function()" http://docs.freebsd.org/mail/archive/2003/freebsd-current/20030302.freebsd-current.html Mike Barcroft quoted a section of the POSIX standard which says that pthread_t must be an arithmetic type. Garrett Wollman indicated that changing the definition of pthread_t to __intptr_t would be one possible solution. -- Craig Rodrigues http://home.attbi.com/~rodrigc rodrigc@attbi.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030529011047.GA4182>