Pthreaded python on linux?

hajime@jsk.t.u-tokyo.ac.jp
Wed, 10 Aug 94 05:02:53 +0900

Has anyone successfully made a pthreaded python(1.0.3) on linux?

I got the pthead-1.32 package and patched python using the patch that
was posted to this mailing list earlier on, but when I do make, I get
the following error message.

-------------------------------------

gcc -O -I./../Include -I.. -DHAVE_CONFIG_H -c thread.c -o thread.o
thread.c: In function `start_new_thread':
thread.c:393: incompatible type for argument 2 of `pthread_create'
thread.c:393: warning: passing arg 3 of `pthread_create' from
incompatible poin\
ter type
thread.c: In function `allocate_lock':
thread.c:567: `pthread_mutexattr_default' undeclared (first use this function)
thread.c:567: (Each undeclared identifier is reported only once
thread.c:567: for each function it appears in.)
thread.c:572: `pthread_condattr_default' undeclared (first use this function)
make[1]: *** [thread.o] Error 1

-------------------------------------

l.567 is
if ( pthread_mutex_init(&lock->mutex, pthread_mutexattr_default) )

I read the source and added the following lines:

pthread_mutexattr_t *pthread_mutexattr_default;
pthread_condattr_t *pthread_condattr_default;

but I got a segmentation fault which originated in the pthread library.

I would appreciate any suggestions.

Hajime Saito.

Univ. of Tokyo Faculty of Engineering.
Inoue and Inaba Lab.