John Polstra <[EMAIL PROTECTED]> writes: > In article <[EMAIL PROTECTED]>, > Mike Barcroft <[EMAIL PROTECTED]> wrote: > > John Polstra <[EMAIL PROTECTED]> writes: > > > FreeBSD violates POSIX in this respect. The 1003.1 standard > > > (section 2.5) requires pthread_t to be an arithmetic type. > > > > It looks like this requirement was removed in POSIX.1-2001. > > Interesting. I don't have that standard and wasn't aware of the > change. Are you sure the requirement was removed? It was hidden > away in an obscure place in the 1996 edition of the standard. > There's a table of "Primitive System Data Types" containing the > usual suspects (dev_t, gid_t, uid_t, ...) and including the thread > types I mentioned. Then there's a sentence in the nearby text that > says, "All of the types listed in Table 2-1 shall be arithmetic > types ..."
Here's the text: : 12974 All of the types shall be defined as arithmetic types of an appropriate length, with the following : 12975 exceptions: : 12976 XSI key_t : 12977 THR pthread_attr_t : 12978 BAR pthread_barrier_t : 12979 pthread_barrierattr_t : 12980 THR pthread_cond_t : 12981 pthread_condattr_t : 12982 pthread_key_t : 12983 pthread_mutex_t : 12984 pthread_mutexattr_t : 12985 pthread_once_t : 12986 pthread_rwlock_t : 12987 pthread_rwlockattr_t : 12988 SPI pthread_spinlock_t : 12989 TRC trace_attr_t : 12990 trace_event_id_t : 12991 TRC TEF trace_event_set_t : 12992 TRC trace_id_t So it looks like pthread_t must be an arithmetic type, but not the others. My mistake. It goes on to say: : 13010 There are no defined comparison or assignment operators for the following types: : 13011 THR pthread_attr_t : 13012 BAR pthread_barrier_t : 13013 pthread_barrierattr_t : 13014 THR pthread_cond_t : 13015 pthread_condattr_t : 13016 pthread_mutex_t : 13017 pthread_mutexattr_t : 13018 pthread_rwlock_t : 13019 pthread_rwlockattr_t : 13020 SPI pthread_spinlock_t : 13021 TRC trace_attr_t Again pthread_t isn't listed. Best regards, Mike Barcroft To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message