This is the mail archive of the glibc-linux@ricardo.ecn.wfu.edu mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Pthread_once() halts at second call


Hi All

I have two computers. One running Linux 2.0.36 and glibc-2.0.7, the other one running Linux 2.2.13 and glibc-2.1.3

My program is running quite OK on the first one, just that sometimes two pthreads enter a section protected by a mutex at the same time. This sometimes leads to a double delete[] on the same pointer
and a segmentation fault. I suppose the problem is that the pthead_mutex_lock() is not atomic. Kaz Kylheku advised me to upgrade to glibc 2.1.3, what I did on my second machine.
But there the function pthread_once(), working great at the first machine just halts when called the second time.

Has anyone an idea, what to do?

Many thanks

Jörg
Müller-Tolk
_________________________________________________________
             ,
    ________/_    Joerg Mueller-Tolk    Muehlenweg 10
    _ __ __/ / ,' joerg@mueller-tolk.de 85653 Aying
_ / /  /  / /,'__________________________________________
 / /  /  / /'.    Mobile: 0177 8095711  Fax:  08095 2282
 \________/   '.  Office: 08102 740-167 Home: 08095 448
_______________________________may_the_force_be_with_you_




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]