Next Previous Contents

16. Threads

If you need multithreading, using POSIX threads will give your application portability, even to non-Linux embedded systems. For example, they're supported by EL/IX (see http://sources.redhat.com/elix/), eCos, RTEMs, and virtually all desktop systems.

POSIX threads support is supplied with glibc2 as an add-on, enabled by configuring with '--enable-add-ons=linuxthreads'.

It is also possible to build older (i.e. smaller) libc5 with LinuxThreads. See: http://pauillac.inria.fr/~xleroy/linuxthreads/faq.html

LinuxThread support has now been integrated into the official gdb release (currently 5.0), which makes thread debugging much easier. Versions of gdb prior to 5.0 did not support threads directly, although you can 'attach' to the thread processes individually.

The courageous can also call clone() directly.


Next Previous Contents