File: pthread.tgz Description: POSIX kernel-level threads for QNX4 Keywords: POSIX, threads, kernel, library, mutex, condition variable Version: 1.00 beta Entered-date: Aug 27, 1998 Author: Steve Furr Ported-by: Original-site: qnx Copying-policy: copyright Supplemental: Thread library for QNX4 compatible with the POSIX 1003.1c standard. The library implements kernel level threads as opposed to user-level threads for better integration with QNX message passing and blocking I/O calls. The library provides all synchronization primitives required by the standard including synchronization variables and thread synchronization. The library replaces a number of standard library calls with thread-safe versions (e.g. sleep()) or to introduce thread cancellation points as mandated by the specification. All I/O calls are also replaced to insure that file descriptors are correctly shared between threads (i.e. shared following tfork(), not just inherited). REQUIREMENTS ------------ o Watcom C 11.0 beta (10.6 *may* work) o QNX 4.25C revision of Proc o Fsys.424(?) - Fsys version that supports arbitray _IO_DUP messages from the appropriate effective user id. COMPILATION ----------- Programs using the POSIX threads library must be compiled with stack based calling conventions. Programs must be linked with -lpthreads and -lsys. CAVEATS ------- There is one known limitation on the use of the library. It isn't safe to call getpid() within a multi-threaded program and store the pid for later use, unless a thread has already been created, or the pthread_self() function has been called. This is because the primordial thread is morphed into a different process when the library initializes itself and creates a synchronization thread.