File: pthreads-1.0b4.tgz Description: POSIX kernel-level threads for QNX4 Keywords: POSIX, threads, kernel, library, mutex, condition variable Version: 1.00 beta 4 Entered-date: Oct 29, 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 10.6 or newer o QNX 4.25C revision of Proc o Fsys.424Q or later: 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. CHANGE LOG ---------- Release 1.0 beta 4: Oct 13 - Fixed fcntl() bug that broke dup() and dup2() for some cases Oct 13 - Fixed shared file descriptor duplication when using fds from remote I/O managers. Ditto for fds belonging to file streams. Release I/O lock during period while accept() is blocked. New routine added to ensure that valid file descriptors are assigned while the I/O lock is released to avoid data races (e.g. accept() above). Sept ?? - Fixed scheduling priority problems when run as root. Setting priority with root access would cause priority to drop to zero. (Related to configuration option that allows you to set the priority of the server; user threads are restricted to run at least as low as the server).