Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

pthread(3)  —  Subroutines

NAME

pthread − Introduction to DCE Threads

DESCRIPTION

DCE Threads are a set of routines that you can call to create a multithreaded program. Multithreading is used to improve the performance of a program. 

The routines in this section are listed alphabetically. However, the the routines can be grouped according to the following categories:

       •Threads Routines

       •Attributes Object Routines

       •Mutex Routines

       •Condition Variable Routines

       •Per-Thread Context Routines

       •Thread Cancelation Routines

       •Thread Priority and Scheduling Routines

       •Cleanup Routines

Threads Routines

pthread_createCreates a Thread

pthread_delay_npCauses a Thread to Wait for a Period of Time

pthread_detachMarks a Thread for Deletion

pthread_exitTerminates the Calling Thread

pthread_joinCauses the Calling Thread to Wait for the Termination of a Specified Thread

pthread_onceCalls an Initialization Routine to be Executed Only Once

pthread_selfObtains the Identifier of the Current Thread

pthread_yieldNotifies the Scheduler that the Current Thread Will Release its Processor to Other Threads of the Same or Higher Priority

Attributes Object Routines

pthread_attr_createCreates a Thread Attributes Object

pthread_attr_deleteDeletes a Thread Attributes Object

pthread_attr_getinheritschedObtains the Inherit Scheduling Attribute

pthread_attr_getprioObtains the Scheduling Priority Attribute

pthread_attr_getschedObtains the Scheduling Policy Attribute

pthread_attr_getstacksizeObtains the Stacksize Attribute

pthread_attr_setinheritschedChanges the Inherit Scheduling Attribute

pthread_attr_setprioChanges the Scheduling Priority Attribute

pthread_attr_setschedChanges the Scheduling Policy Attribute

pthread_attr_setstacksizeChanges the Stacksize Attribute

pthread_condattr_createCreates a Condition Variable Attributes Object

pthread_condattr_deleteDeletes a Condition Variable Attributes Object

pthread_mutexattr_createCreates a Mutex Attributes Object

pthread_mutexattr_deleteDeletes a Mutex Attributes Object

pthread_mutexattr_getkind_np
Obtains the Mutex Type Attribute

pthread_mutexattr_setkind_np
Specifies the Mutex Type Attribute

Mutex Routines

pthread_lock_global_npLocks a Global Mutex

pthread_mutex_destroyDeletes a Mutex

pthread_mutex_initCreates a Mutex

pthread_mutex_lockLocks a Mutex and Waits if Mutex is Already Locked

pthread_mutex_trylockLocks a Mutex and Returns if Mutex is Already Locked

pthread_mutex_unlockUnlocks a Mutex

pthread_unlock_global_npUnlocks a Global Mutex

Condition Variable Routines

pthread_cond_broadcastWakes All Threads Waiting on a Condition Variable

pthread_cond_destroyDeletes a Condition Variable

pthread_cond_initCreates a Condition Variable

pthread_cond_signalWakes One Thread Waiting on a Condition Variable

pthread_cond_timedwaitCauses a Thread to Wait for a Condition Variable to be Signaled or Broadcast for a Specified Period of Time

pthread_cond_waitCauses a Thread to Wait for a Condition Variable to be Signaled or Broadcast

pthread_get_expiration_npObtains a Value Representing a Desired Expiration Time

Per-thread Context Routines

pthread_getspecificObtains the Per-thread Context Associated with the Specified Key

pthread_keycreateGenerates a Unique Per-thread Context Key Value

pthread_setspecificSets the Per-thread Context Associated with the Specified Key

Thread Cancelation Routines

pthread_cancelAllows a Thread to Request Termination

pthread_setasynccancelEnables or Disables the Current Thread’s Asynchronous Cancelability

pthread_setcancelEnables or Disables the Current Thread’s General Cancelability

pthread_testcancelRequests Delivery of a Pending Cancel

Priority and Scheduling Routines

pthread_getprioObtains the Current Priority of a Thread

pthread_getschedulerObtains the Current Scheduling Policy of a Thread

pthread_setprioChanges the Current Priority of a Thread

pthread_setschedulerChanges the Current Scheduling Policy and Priority of a Thread

Cleanup Routines

pthread_cleanup_popRemoves a Cleanup Handler from the Stack

pthread_cleanup_pushEstablishes a Cleanup Handler

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026