Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Feb 2003 12:15:53 -0500 (EST)
From:      Garrett Wollman <wollman@lcs.mit.edu>
To:        John Polstra <jdp@polstra.com>
Cc:        current@FreeBSD.ORG
Subject:   Re: OpenSSL question for id_function()
Message-ID:  <200302271715.h1RHFri9048957@khavrinen.lcs.mit.edu>
In-Reply-To: <200302271640.h1RGeMx2029701@vashon.polstra.com>
References:  <20030225155724.GB9400@attbi.com> <200302271640.h1RGeMx2029701@vashon.polstra.com>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Thu, 27 Feb 2003 08:40:22 -0800 (PST), John Polstra <jdp@polstra.com> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302271715.h1RHFri9048957>