From owner-freebsd-current Thu Feb 27 8:40:31 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 D772237B405 for ; Thu, 27 Feb 2003 08:40:29 -0800 (PST) Received: from wall.polstra.com (wall-gw.polstra.com [206.213.73.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB2B943FA3 for ; Thu, 27 Feb 2003 08:40:28 -0800 (PST) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.12.3/8.12.3) with ESMTP id h1RGeNu5058782 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Thu, 27 Feb 2003 08:40:23 -0800 (PST) (envelope-from jdp@vashon.polstra.com) Received: (from jdp@localhost) by vashon.polstra.com (8.12.6/8.12.6/Submit) id h1RGeMx2029701; Thu, 27 Feb 2003 08:40:22 -0800 (PST) (envelope-from jdp) Date: Thu, 27 Feb 2003 08:40:22 -0800 (PST) Message-Id: <200302271640.h1RGeMx2029701@vashon.polstra.com> To: current@freebsd.org From: John Polstra Cc: rodrigc@attbi.com Subject: Re: OpenSSL question for id_function() In-Reply-To: <20030225155724.GB9400@attbi.com> References: <20030225155724.GB9400@attbi.com> Organization: Polstra & Co., Seattle, WA 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 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. :-) John -- John Polstra John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message