Xos_r.h

Xthreads.h

Threads libraries

Xlib and the associated libraries can support various threading libraries from the operating system they run on.

POSIX pthreads

Microsoft Windows threads

DEC Threads

Support for both threaded and non threaded applications

Since not all systems support threads by default in their basic C libraries, Xlib has some support for emulating threads support when it's not present in libc, so that the same library can be used in applications built with or without thread support.

This support is provided throught a set of weak symbols function pointers that define stub implementatons of the threading functions that may be called by thread-aware code. When a real theading implementation is present, the weak definitions are ignored, and the code will call the real functions from the system's threading library. If on threading implemnentation the stubs functions pointed at by the weak symbols will be called. Those stubs are no-op that only make sense in a thread-less environment of course.