This is the mail archive of the
glibc-linux@ricardo.ecn.wfu.edu
mailing list for the glibc project.
Pthread_once() halts at second call
- To: glibc list <glibc-linux at ricardo dot ecn dot wfu dot edu>, "Müller-Tolk, Jörg" <joerg at mueller-tolk dot de>
- Subject: Pthread_once() halts at second call
- From: Joerg Mueller-Tolk <joerg dot mueller-tolk at retarus dot de>
- Date: Tue, 14 Mar 2000 13:41:38 +0100
- Organization: Retarus Network Servuces
- Reply-To: glibc-linux at ricardo dot ecn dot wfu dot edu
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_