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


1.6 DECthreads POSIX 1003.1c Routines Summary

The highly portable pthread interface contains routines grouped in the following functional categories:

DECthreads also provides routines that implement nonportable extensions to the POSIX 1003.1c standard. These routines are grouped in these functional categories:

Table 1-1 lists and summarizes the DECthreads routines into these functional groups that support the POSIX thread (pthread) interface.

Table 1-1 DECthreads POSIX 1003.1c Routines Summary



       General Threads Routines

Routine                                 Description

pthread_atfork        Declares fork handlers to be called.

pthread_create        Creates a thread object and thread.

pthread_detach        Marks a thread object for deletion.

pthread_equal         Compares one thread identifier to another
                      thread identifier.

pthread_exit          Terminates the calling thread.

pthread_join          Causes the calling thread to wait for the
                      termination of a specified thread and detach
                      it.

pthread_kill          Delivers a signal to a specified thread.

pthread_once          Calls an initialization routine to be executed
                      only once.

pthread_self          Obtains the identifier of the current thread.

pthread_sigmask       Examines or changes the current thread's
                      signal mask.

       Thread Attributes Object Routines

Routine                                 Description
                  
pthread_attr_         Destroys a thread attributes object.
destroy

pthread_attr_         Obtains the detachstate attribute from the
getdetachstate        specified pthread attributes object.

pthread_attr_         Obtains the inherit scheduling attribute from
getinheritsched       the specified thread attributes object.

pthread_attr_         Obtains the scheduling parameters for an
getschedparam         attribute of the specified thread attributes
                      object.

pthread_attr_         Obtains the scheduling policy attribute of the
getschedpolicy        specified thread attributes object.

pthread_attr_         Obtains the stacksize attribute of the
getstacksize          specified thread attributes object.

pthread_attr_init     Initializes a thread attributes object.

pthread_attr_         Changes the detachstate attribute in the
setdetachstate        specified thread attributes object.

pthread_attr_         Changes the inherit scheduling attribute of
setinheritsched       the specified thread attributes object.

pthread_attr_         Changes the values of the parameters
setschedparam         associated with the scheduling policy
                      attribute of the specified thread attributes
                      object.

pthread_attr_         Changes the scheduling policy attribute of the
setschedpolicy        specified thread attributes object.

pthread_attr_         Changes the stacksize attribute in the
setstacksize          specified thread attributes object.


       Mutex Attributes Object Routines

Routine                                 Description

pthread_mutexattr_    Initializes a mutex attributes object.
init

pthread_mutexattr_    Destroys a mutex attributes object.
destroy

       Condition Variable Attributes Object Routines

Routine                                 Description

pthread_condattr_     Initializes a condition variable attributes
init                  object that specifies condition variable
                      attributes when created.

pthread_condattr_     Destroys a condition variable attributes
destroy               object.

       Mutex Routines

Routine                                 Description

pthread_mutex_        Destroys a mutex.
destroy

pthread_mutex_init    Initializes a mutex with attributes specified
                      by the attributes argument.

pthread_mutex_lock    Locks an unlocked mutex. If locked, the caller
                      waits for the mutex to become available.

pthread_mutex_        Locks an unlocked mutex or returns immediately
trylock               if mutex is locked.

pthread_mutex_unlock  Unlocks the mutex.

       Condition Variable Routines

Routine                                 Description

pthread_cond_         Wakes all threads waiting on a condition
broadcast             variable.

pthread_cond_destroy  Destroys a condition variable.

pthread_cond_init     Initializes a condition variable.

pthread_cond_signal   Wakes at least one thread that is waiting on a
                      condition variable.

pthread_cond_         Causes a thread to wait for a condition
timedwait             variable to be signaled or broadcasted for
                      a specified period of time.

pthread_cond_wait     Causes a thread to wait for a condition
                      variable to be signaled or broadcasted.

       Thread-Specific Data Routines

Routine                                 Description

pthread_getspecific   Obtains the thread-specific data associated
                      with the specified key.

pthread_key_create    Generates a unique thread-specific data key.

pthread_setspecific   Sets the thread-specific data value associated
                      with the specified key for the current thread.

pthread_key_delete    Deletes a thread-specific data key.

       Thread Cancellation Routines

Routine                                 Description

pthread_cancel        Allows a thread to request that it, or another
                      thread terminate execution.

pthread_cleanup_pop   Removes a cleanup handler at the top of the
                      cleanup stack and optionally executes it.

pthread_cleanup_push  Establishes a cleanup handler to be executed
                      when the thread exits or is canceled.

pthread_              Sets the current thread's cancelability state.
setcancelstate

pthread_              Sets the current thread's cancelability type.
setcanceltype

pthread_testcancel    Requests delivery of any pending cancel to the
                      current thread.

       Thread Priority and Scheduling Routines

Routine                                 Description

pthread_              Obtains the current scheduling policy and
getschedparam         scheduling parameters of a thread.

pthread_              Changes the current scheduling policy and
setschedparam         scheduling parameters of a thread.

sched_yield           Notifies the scheduler that the current thread
                      will release its processor to other threads of
                      the same or higher priority.

       Non-Portable Extensions

Routine                                 Description

Thread attribute      pthread_attr_getguardsize_np
routines              pthread_attr_setguardsize_np


Thread execution      pthread_delay_np
routines              pthread_getexpiration_np

                      pthread_getsequence_np

Mutex routines        pthread_lock_global_np

                      pthread_unlock_global_np

Mutex attributes      pthread_mutexattr_gettype_np
routines              pthread_mutexattr_settype_np


Condition variable    pthread_cond_signal_int_np
routines

Debugging support     pthread_debug
routines              pthread_debug_cmd





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