## Overview - Using the DCE Threads Exception-Returning Interface

DCE Threads provides the following two ways to obtain information about the status of a threads routine:

· The routine returns a status value to the thread.

· The routine raises an exception.

Before you write a multithreaded program, you must choose only one of the preceding two methods of receiving status. These two methods cannot be used together in the same code module.

The POSIX P1003.4a (pthreads) draft standard specifies that errors be reported to the thread by setting the external variable errno to an error code and returning a function value of 1. The threads reference pages document this status-value-returning interface (see the OSF DCE Application Development Reference). However, an alternative to status values is provided by DCE Threads in the exception-returning interface.

This topic introduces and provides conventions for the modular use of the exception-returning interface to DCE Threads.

##