Re: [gtk-list] pthread_mutex_* on gthread-posix



Hi, Emilio

>    I just noticed that the 2nd parameter of pthread_mutex_init()
> in GThreads's POSIX implementation file uses NULL. That I know
> this is ok for the 'latest' POSIX standard, but on the old
> standard (Draft-4?) default initialization is provided by
> using 'pthread_mutexattr_default' as the 2nd parameter.

Thanks for the info. I changed it accordingly for 1.3

> I mention this because looking at gthread-posix.c gives me
> the impression that the old standard is partially supported,
> at least it does for pthread_getspecific().

Yes, but full support is only in 1.3 and will not be merged back into 1.2.
Indeed 1.2 is kind of broken for dce.

> Then, for pthread_mutex_trylock() gthread-posix only supports
> the latest. In the old implementation the resturn values are
> different:
> 
>          mutex_trylock()
>          return value        Draft-4    Draft-10
>          ---------------     -------    ---------
>          already locked         0       [EBUSY]
>          OK, got it             1        0
>          Oops, error           -1       [EINVAL]

That should be fixed in 1.2.1
 
> As for other functions, it seems the old one returned -1
> and had errno set, whereas the 'latest' simply returns
> 0 on success or non-zero (the content of errno) on error.
> Well, at least that is the generalization I have been able
> to make so far in looking at these things. It seems
> AIX 4.3 also uses the old threading stuff :(

Thats fixed in the 1,.3 series
 
> Sorry I don't have time to try out latest CVS versions,
> I have a hard deadline hanging on my neck...

I know, what you mean... ;-)

Bye,
Sebastian
-- 
Sebastian Wilhelmi                   |            här ovanför alla molnen
mailto:wilhelmi@ira.uka.de           |      är himmlen så förunerligt blå
http://goethe.ira.uka.de/~wilhelmi   |



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]