From owner-freebsd-current Thu Feb 27 9:16: 1 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 B191F37B401 for ; Thu, 27 Feb 2003 09:15:59 -0800 (PST) Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 111D043FE0 for ; Thu, 27 Feb 2003 09:15:57 -0800 (PST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: from khavrinen.lcs.mit.edu (localhost [IPv6:::1]) by khavrinen.lcs.mit.edu (8.12.6/8.12.6) with ESMTP id h1RHFrpI048960 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Thu, 27 Feb 2003 12:15:53 -0500 (EST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.12.6/8.12.6/Submit) id h1RHFri9048957; Thu, 27 Feb 2003 12:15:53 -0500 (EST) (envelope-from wollman) Date: Thu, 27 Feb 2003 12:15:53 -0500 (EST) From: Garrett Wollman Message-Id: <200302271715.h1RHFri9048957@khavrinen.lcs.mit.edu> To: John Polstra Cc: current@FreeBSD.ORG Subject: Re: OpenSSL question for id_function() In-Reply-To: <200302271640.h1RGeMx2029701@vashon.polstra.com> References: <20030225155724.GB9400@attbi.com> <200302271640.h1RGeMx2029701@vashon.polstra.com> 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 < said: > 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: Not so (with respect to those other types). XBD page 367: # All of the types shall be defined as arithmetic types of an # appropriate length, with the following exceptions: # # key_t # pthread_attr_t # pthread_barrier_t # pthread_barrierattr_t # pthread_cond_t # pthread_condattr_t # pthread_key_t # pthread_mutex_t # pthread_mutexattr_t # pthread_once_t # pthread_rwlock_t # pthread_rwlockattr_t # pthread_spinlock_t # trace_attr_t # trace_event_id_t # trace_event_set_t # trace_id_t SSWG-RT got a bit carried away with pthread_t, I think, because they define a comparison operation (pthread_equal()) even though such an operation is never necessary on arithmetic types (the `=' operator can be used for that purpose). We could define pthread_t as __intptr_t without making significant changes to the implementation. -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message