Date: Thu, 27 Feb 2003 11:46:51 -0500 From: Mike Barcroft <mike@FreeBSD.org> To: John Polstra <jdp@polstra.com> Cc: current@freebsd.org, rodrigc@attbi.com Subject: Re: OpenSSL question for id_function() Message-ID: <20030227114651.A93968@espresso.bsdmike.org> In-Reply-To: <200302271640.h1RGeMx2029701@vashon.polstra.com>; from jdp@polstra.com on Thu, Feb 27, 2003 at 08:40:22AM -0800 References: <20030225155724.GB9400@attbi.com> <200302271640.h1RGeMx2029701@vashon.polstra.com>
next in thread | previous in thread | raw e-mail | index | archive | help
John Polstra <jdp@polstra.com> writes: > In article <20030225155724.GB9400@attbi.com>, > Craig Rodrigues <rodrigc@attbi.com> wrote: > > > > pthread_self() returns something of type pthread_t. > > This code works under Linux, because pthread_t is mapped to an integer value. > > > > However, on FreeBSD, pthread_t is a pointer to struct pthread, so this > > code does not compile: > > FreeBSD violates POSIX in this respect. The 1003.1 standard > (section 2.5) requires pthread_t to be an arithmetic type. We are > non-compliant in the same way for almost all of the primary > thread-related types: > > pthread_attr_t > pthread_mutex_t > pthread_mutexattr_t > pthread_cond_t > pthread_condattr_t > pthread_once_t > > We got it right for pthread_key_t, though. :-) It looks like this requirement was removed in POSIX.1-2001. A problem with our implementation is that struct pthread* is in the implementation namespace, so we can't define these types in <sys/types.h> as required. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030227114651.A93968>