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?


 
On Thu, 2003-02-27 at 11:40, John Polstra wrote:
> In article <[EMAIL PROTECTED]>,
> Craig Rodrigues  <[EMAIL PROTECTED]> wrote:
> > 
> > pthread_self() returns something of type pthread_t.
> > This code works under Linux, because pthread_t is mapped to an integer value.
> > 
> > However, on FreeBSD, pthread_t is a pointer to struct pthread, so this
> > code does not compile:
> 
> 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:
> 
>     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. :-)
> 
> John
> -- 
>   John Polstra
>   John D. Polstra & Co., Inc.                        Seattle, Washington USA
>   "Disappointment is a good sign of basic intelligence."  -- Chögyam Trungpa
> 
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-current" in the body of the message
-- 
"The Law of Leaky Abstractions"
There is a time where abstractions lead to the inablity to 
fix problems that leak through the abstraction.
http://www.joelonsoftware.com/articles/LeakyAbstractions.html


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to