From owner-freebsd-current Thu Feb 27 10:47:12 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 ACF7837B401 for ; Thu, 27 Feb 2003 10:47:10 -0800 (PST) Received: from mail.speakeasy.net (mail16.speakeasy.net [216.254.0.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id A5AB543FB1 for ; Thu, 27 Feb 2003 10:47:07 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 23040 invoked from network); 27 Feb 2003 18:47:13 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail16.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 27 Feb 2003 18:47:13 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.6/8.12.6) with ESMTP id h1RIjUhT027220; Thu, 27 Feb 2003 13:45:30 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20030227165915.GA21958@attbi.com> Date: Thu, 27 Feb 2003 13:47:18 -0500 (EST) From: John Baldwin To: Craig Rodrigues Subject: Re: OpenSSL question for id_function() Cc: freebsd-security@freebsd.org, current@freebsd.org, John Polstra 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 On 27-Feb-2003 Craig Rodrigues wrote: > On Thu, Feb 27, 2003 at 08:40:22AM -0800, John Polstra wrote: >> FreeBSD violates POSIX in this respect. > > Doh! I just looked at: > http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libpthread/include/pthread.h > and it looks like OpenBSD does the same thing. > > Just wondering, is the FreeBSD KSE project implementing a > POSIX compliant pthread_t? > >> 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. :-) > > Cool. Sometimes standards are a pain in the neck, but my main interest > in FreeBSD's POSIX compliance for threads is to be more and more of a > drop-in replacement for Linux. :) > > > So is OpenSSL stuff which requires id_function() broken on > FreeBSD then? > > The C++-style work-around for my code is to do: > > return reinterpret_cast(pthread_self()); Use uintptr_t or intptr_t rather than unsigned long. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message