OSF DCE Application Development Guide--Core Components

Chapter 8. Programming with Threads
This chapter discusses issues you face when writing a multithreaded program and how to
deal with those issues.
The topics discussed in this chapter are as follows:
Calling UNIX services
Using signals
Nonthreaded libraries
Avoiding nonreentrant software
Avoiding priority inversion
Using synchronization objects
Signaling a condition variable
8.1 Calling UNIX Services
On a UNIX system that does not have kernel support for threads, making system and
library calls from within a multithreaded program raises the following issues:
System calls may not be thread-reentrant.
If a system call blocks, it blocks the entire process instead of blocking the calling
thread only.
8.1.1 Jacket Routines
To resolve the previous two issues, DCE Threads provides jacket routines for a number
of UNIX system calls. Threads call the jacket routine instead of the UNIX system
service; this allows DCE Threads to take action on behalf of the thread before or after
calling the system service. For example, the jacket routines ensure that only one thread
124245 Tandem Computers Incorporated 81