[parisc-linux] Problem with threads..
Randolph Chung
Randolph Chung <randolph@tausq.org>
Sun, 30 Dec 2001 10:42:22 -0800
> > 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
--
@..@ http://www.TauSq.org/
(----)
( >__< )
^^ ~~ ^^