[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kimageshop
Subject:    Re: threading libs
From:       Bavo De Ridder <bavodr () poboxes ! com>
Date:       1999-08-27 17:05:48
[Download RAW message or body]

Hello,

I know the problem and I can tell you that is a very weird problem. AFAIK you
have two generations of pthread.h files concerning mutex attributes:

one with pthread_mutexattr_setkind_np (np -> non portable)
one with pthread_mutexatrr_settype (if __USE_UNIX98) is defined

Apparently there are systems on which __USE_UNIX98 is not defined and which use
the second generation pthread.h meaning you have no way to set mutex
attributes. I am probably wrong and I wouldn't know what to do. UNIX98, ....
glibc versioning is completely new to me.

However, upgrading to glibc2 (included with Redhat 6.0) should solve the
problem. Sorry .....

I just had a look how ACE does the trick. They do the same I would do:

they check (using configure) if pthreads has ....setkind_np, if yes, they use
the type parameters and construct specialized mutexes. If setkind_np is not
present then ACE will not use the type parameter. Currently however you have
the settype function.

So:

If the settype is available, use that.
if the setkind_np us available, use that (if settype is not there)
else ignore mutex types

This should be put in some kind of configure script. However configure scripts
are way above my head ....


BDR

On Fri, 27 Aug 1999, you wrote:
>On Wed, Aug 25, 1999 at 11:15:25PM +0200, Michael Koch wrote:
>
>Hi,
>
>the OpenClasses built nicely, but the tests unfortunately don't :-/
>
>gis@nevermind:~/threading/OpenClasses/test/Threads1 [0] > make
>g++ -c -I/home/gis/threading/OpenClasses/include -D_REENTRANT -Wall -W
>test.C
>g++ -o test -D_REENTRANT -Wall -W test.o
>-L/home/gis/threading/OpenClasses/lib -lOpenFC -lpthread -ldl
>/home/gis/threading/OpenClasses/lib/libOpenFC.so: undefined reference to
>`pthread_mutexattr_settype'
>
>I don't have any pthread_mutexattr_settype in my /usr/include/pthread.h...
>should it be there or somewhere else? Do I have to upgrade libpthread (or
>glibc2, I have glibc2.07).
>
>Cheers,
>Carsten Pfeiffer
>-- 
>http://www.geocities.com/SiliconValley/1632/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic