Problem with threads..
Hello,
the pan newsreader does not want to work on parisc platforms (neither the ones from the debian archive nor a version compiled from scratch). Digging a little bit I found the application hangs at pthread_mutex_lock and similar calls. Tried with various kernel versions over the last couple of months, never worked. Known issue ?
Thanks,
Christian
Quoted 3 lines · Christian Suder
Hello,
the pan newsreader does not want to work on parisc platforms (neither the ones from the debian archive nor a version compiled from scratch). Digging a little bit I found the application hangs at
pthread_mutex_lockand similar calls. Tried with various kernel versions over the last couple of months, never worked. Known issue ?
I can confirm the problem here on my 712/60. DirectFB (www.directfb.org) does not work either and hangs during first pthread_mutex_lock().
andi
Quoted 2 lines
the pan newsreader does not want to work on parisc platforms (neither the ones from the debian archive nor a version compiled from scratch). Digging a little bit I found the application hangs at
pthread_mutex_lockand similar calls. Tried with various kernel versions over the last couple of months, never worked. Known issue ?
fwiw, what i've seen elsewhere is that on palinux, you have to make sure the mutex is initialized before locking works. on other platforms sometimes you can get away with doing a lock without a mutex init.
for another example see http://bugs.debian.org/124307
randolph
Signature · 4 lines
@..@ http://www.TauSq.org/ (----) ( >__< ) ^^ ~~ ^^
Quoted 1 line · On Sat, 29 Dec 2001 22:44:47 -0800 "Randolph Chung" <[email protected]> wrote:
Quoted 1 line
the pan newsreader does not want to work on parisc platforms (neither
the ones from the debian archive nor a version compiled from scratch). Digging a little bit I found the application hangs at pthread_mutex_lock and similar calls. Tried with various kernel versions over the last couple of months, never worked. Known issue ?> >
Quoted 4 lines
fwiw, what i've seen elsewhere is that on palinux, you have to make sure the mutex is initialized before locking works. on other platforms sometimes you can get away with doing a lock without a mutex init.
Yes !!! There was one of 4 mutex not initialized, added that one and now it works.
Many thanks,
Christian
Quoted 6 lines
Quoted 3 lines
fwiw, what i've seen elsewhere is that on palinux, you have to make sure the mutex is initialized before locking works. on other platforms sometimes you can get away with doing a lock without a mutex init.
Yes !!! There was one of 4 mutex not initialized, added that one and now it works.
Please follow the instructions at http://www.debian.org/Bugs/Reporting
and file a bug, and let the maintainer know what you changed to get pan to work.
thanks!
randolph
Signature · 4 lines
@..@ http://www.TauSq.org/ (----) ( >__< ) ^^ ~~ ^^
Quoted 6 lines
Quoted 3 lines
fwiw, what i've seen elsewhere is that on palinux, you have to make sure the mutex is initialized before locking works. on other platforms sometimes you can get away with doing a lock without a mutex init.
Yes !!! There was one of 4 mutex not initialized, added that one and now it works.
Just to clarify...
hppa is the only platform supported by linuxthreads right now where we initialize the mutex variable to 1 so that we can do locking using ldcw. On other platforms, locks are initialized to 0 and locking is done using things like test-and-set.
In general, you always need to call pthread_mutex_init for mutexes to work. In the case of pan, the mutex variable is declared static, so it is automatically initialized to 0.
randolph
Signature · 4 lines
@..@ http://www.TauSq.org/ (----) ( >__< ) ^^ ~~ ^^
Quoted 10 lines
Just to clarify...
hppa is the only platform supported by linuxthreads right now where we initialize the mutex variable to 1 so that we can do locking using ldcw. On other platforms, locks are initialized to 0 and locking is done using things like test-and-set.
In general, you always need to call
pthread_mutex_initfor mutexes to work. In the case of pan, the mutex variable is declared static, so it is automatically initialized to 0.
does that mean using the PTHREAD_MUTEX_INITIALIZER as defined in phread.h (which DirectFB does) does not work on parisc, and we _have_ to call pthreas_mutex_init()? Why does PTHREAD_MUTEX_INITIALIZER exist then?
#define PTHREAD_MUTEX_INITIALIZER \
{0, 0, 0, PTHREAD_MUTEX_TIMED_NP, __LOCK_INITIALIZER}
andi
Quoted 4 lines
does that mean using the
PTHREAD_MUTEX_INITIALIZERas defined inphread.h(which DirectFB does) does not work on parisc, and we _have_ to callpthreas_mutex_init()? Why doesPTHREAD_MUTEX_INITIALIZERexist then?
that works too....
randolph
Signature · 4 lines
@..@ http://www.TauSq.org/ (----) ( >__< ) ^^ ~~ ^^