From owner-freebsd-current Thu Feb 27 8:59:33 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7C2D137B401 for ; Thu, 27 Feb 2003 08:59:32 -0800 (PST) Received: from espresso.bsdmike.org (espresso.bsdmike.org [65.39.129.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id D3D4143FB1 for ; Thu, 27 Feb 2003 08:59:31 -0800 (PST) (envelope-from mike@espresso.bsdmike.org) Received: by espresso.bsdmike.org (Postfix, from userid 1002) id 385A49C5F; Thu, 27 Feb 2003 11:46:51 -0500 (EST) Date: Thu, 27 Feb 2003 11:46:51 -0500 From: Mike Barcroft To: John Polstra Cc: current@freebsd.org, rodrigc@attbi.com Subject: Re: OpenSSL question for id_function() Message-ID: <20030227114651.A93968@espresso.bsdmike.org> References: <20030225155724.GB9400@attbi.com> <200302271640.h1RGeMx2029701@vashon.polstra.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200302271640.h1RGeMx2029701@vashon.polstra.com>; from jdp@polstra.com on Thu, Feb 27, 2003 at 08:40:22AM -0800 Organization: The FreeBSD Project Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG John Polstra writes: > In article <20030225155724.GB9400@attbi.com>, > Craig Rodrigues 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 as required. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message