[Return to Bookshelf] [Contents] [Previous Section] [Next Section] [Index] [Help]


A.2.2 Building Multithreaded Applications Libraries

Multithreaded applications are built using shared libraries. For a discussion about shared libraries, see the Digital UNIX Programmer's Guide.

Table A-2 contains the libraries supported for multithreaded programming.

Table A-2 Digital UNIX Shared Libraries for Multithreaded Programs


libmach.so      Shared version of threads support library. Direct use of
                mach interfaces is not supported.

libpthread.s    Shared version of the base pthreads package. Requires
                libmach.so, libexc.so, and libc.so

libexc.so       Shared version of Digital UNIX exception support
                package.

libpthreads.so  Shared version of DECthreads "legacy" package,
                implementing the cma and 1003.4a/Draft 4 API sets.

libc.so         Shared version of libc package. (C language runtime.)



Build a multithreaded application using shared versions of libexc, libmach, libpthread, and libc as follows:

% cc -o myprog myprog.c -pthread