From owner-freebsd-current Thu Feb 27 12:15:46 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 2183D37B407 for ; Thu, 27 Feb 2003 12:15:42 -0800 (PST) Received: from www.outpostsentinel.com (66-23-198-138.clients.speedfactory.net [66.23.198.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2581943FAF for ; Thu, 27 Feb 2003 12:15:41 -0800 (PST) (envelope-from cfowler@outpostsentinel.com) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by cfowler.outpostsentinel.com (8.11.6/8.11.6) with ESMTP id h1RGmRl17020 for ; Thu, 27 Feb 2003 11:48:27 -0500 Subject: Re: OpenSSL question for id_function() From: cfowler To: current@freebsd.org In-Reply-To: <200302271640.h1RGeMx2029701@vashon.polstra.com> References: <20030225155724.GB9400@attbi.com> <200302271640.h1RGeMx2029701@vashon.polstra.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Mailer: Ximian Evolution 1.0.3 (1.0.3-6) Date: 27 Feb 2003 11:48:27 -0500 Message-Id: <1046364507.15089.72.camel@cfowler.outpostsentinel.com> Mime-Version: 1.0 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 Maybe it is possbile to create wrappers for these types in your portable program Is pthread_t a simple handle for the memory location of the pthread_t strucutre? =20 On Thu, 2003-02-27 at 11:40, John Polstra wrote: > In article <20030225155724.GB9400@attbi.com>, > Craig Rodrigues wrote: > >=20 > > pthread_self() returns something of type pthread_t. > > This code works under Linux, because pthread_t is mapped to an integer = value. > >=20 > > However, on FreeBSD, pthread_t is a pointer to struct pthread, so this > > code does not compile: >=20 > 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: >=20 > pthread_attr_t > pthread_mutex_t > pthread_mutexattr_t > pthread_cond_t > pthread_condattr_t > pthread_once_t >=20 > We got it right for pthread_key_t, though. :-) >=20 > John > --=20 > John Polstra > John D. Polstra & Co., Inc. Seattle, Washington = USA > "Disappointment is a good sign of basic intelligence." -- Ch=F6gyam Tr= ungpa >=20 >=20 > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message --=20 "The Law of Leaky Abstractions" There is a time where abstractions lead to the inablity to=20 fix problems that leak through the abstraction. http://www.joelonsoftware.com/articles/LeakyAbstractions.html To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message