next up previous contents index
Next: Creation of threads Up: $FILE Previous: Colors in help files   Contents   Index


Threads

This version of the command interpreter library has been tested with two implementations of threads :

- linuxthreads version 0.71 (see http://pauillac.inria.fr/~xleroy/linuxthreads)

- The thread library that comes with libc6


Threads are working well with linuxthreads library (with libc5) , but not with the last versions of GNU pth (I don't know why). The threads are detached. Joinable threads work also, but with the following problems :

- memory leaks

- After 1024 threads have been created and finished, it is impossible to create new ones.

Threads provided with libc6 work also, but only joinable ones. For threads to be joinable, the file interp.c must be modified as follows : in line 2111 replace PTHREAD_CREATE_DETACHED with PTHREAD_CREATE_JOINABLE.


The only functions of the thread library which are used in the command interpreter library are : pthread_attr_init, pthread_attr_setdetachstate, pthread_create, pthread_mutex_init, pthread_mutex_lock and pthread_mutex_unlock.



Subsections

2009-11-12