[Prev]
[Contents]
[Next]
Table of Contents
Important Pthread Definitions
Attribute Object
Cancel
Cancelation Cleanup Handler
Cancelation Point
Cancelation State
Cancelation Type
Condition Variable
Detach a thread
Exit Status
Global Mutex
Initial thread
Join to a thread
Named Mutex
Orphaned Mutex
Main thread
Multi-Thread Capable
Multi-Threaded
Mutex
Posix thread handle
Pthread
Primary thread
Recursive Mutex
Scheduling Parameters
Scheduling Policy
Scope
Secondary thread
Signal
Signal Handler
Signal Safe
Signal Unsafe
Thread
Thread Capable
Thread ID
Thread Local Storage (TLS)
ThreadSafe
Thread Specific Storage
Thread Unsafe
PThread programming introduction
Writing and compiling threaded programs
Header files for Pthread functions
Running threaded programs
Information about the example programs
Common Pthread user errors
Can't find header files pthread.h or qp0ztype.h or qp0zptha.h
Thread creation (pthread_create()) fails with EBUSY or 3029
Mixing thread models or API sets
Reserved fields must be binary zero
Powerful OS/400 cleanup mechanisms allow application deadlock (cancel_handler and C++ automatic destructors)
Thread creation using C++ methods as target doesn't work
MCH3402 from pointer returned by pthread_join()
Differences from the Posix standard, the Single UNIX Specification or other threads implementations
All thread definitions found in pthread.h
Unsupported preprocessor and feature test macros
Unsupported threads APIs
Unsupported constants
Unsupported cancelation points
Unsupported sysconf() configuration variables
Thread Priority and Scheduling:
Thread ID vs. PThread Handle (pthread_t)
Thread ID value and size
Mutexes return EDEADLK when re-locked by owner
Return values from thread start routines are not integers
Threads don't necessarily start before pthread_create() returns.
Initial thread is special, cannot pthread_exit()
Pthread APIs cause asynchronous signals initialization
Not all jobs can create threads, pthread_create() fail w/EBUSY
Read/write locks are recursive
Shared read/write locks are released at thread termination
Read/write locks can be upgraded / downgraded
Read/Write locks do not favor writers (writer starvation is possible)
Spawn API provides more Posix-like process model
C++ destructors and thread termination
Unhandled exceptions terminate the thread (Not the process)
Exceptions vs. Asynchronous signals vs. ANSI C signals
SPAWN CL command, QUSRTOOL example
Creating the SPAWN command
Pthread API Reference
API Introduction
Header files
Preprocessor Values
Primitive data types
Function prototypes
Thread Attributes
Thread Management
Thread Cancelation
Thread Local Storage
Mutex Attributes
Mutexes
Condition Variable Attributes
Condition Variables
Read/Write Lock Attributes
Read/Write Lock
Signals
Unsupported functions
Feature Test Macros
Header files
Pthread API List (Alphabetical)
Pthread API List (By Category)
Thread Management APIs
Thread Specific Storage APIs
Thread Cancelation APIs
Mutex Synchronization APIs
Condition Variable Synchronization APIs
Read/Write Lock Synchronization APIs
Signals APIs
Unsupported APIs
Pthread API Descriptions
Information about the example programs
Thread Management APIs
pthread_attr_destroy
()--Destroy a Thread Attributes Object
pthread_attr_getdetachstate
()--Get Thread Attributes Object Detachstate
pthread_attr_getinheritsched
()--Get Thread Attribute Object Inherit Scheduling Attributes
pthread_attr_getschedparam
()--Get Thread Attributes Object Scheduling Parameters
pthread_attr_init
()--Initialize a Thread Attributes Object
pthread_attr_setdetachstate
()--Set Thread Attributes Object Detachstate
pthread_attr_setinheritsched
()--Set Thread Attribute Inherit Scheduling Attributes
pthread_attr_setschedparam
()--Set Thread Attributes Object Scheduling Parameters.
pthread_clear_exit_np
()--Clear the Exit Status of a Thread
pthread_create
()--Create a Thread
pthread_delay_np
()--Delay a Thread for the Requested Interval
pthread_detach
()--Detach a Thread
pthread_equal
()--Compare Two Threads
pthread_exit
()--Terminate The Calling Thread
pthread_extendedjoin_np
()--Wait for a Thread with Extended Options
pthread_getconcurrency
()--Get the Process Concurrency Level
pthread_getpthreadoption_np
()--Get Pthread Run-Time Option Data
pthread_getschedparam
()--Get Thread Scheduling Parameters
pthread_getthreadid_np
()--Retrieve a Unique Id for the Calling Thread
pthread_getunique_np
()--Retrieve a Unique Id for the Target
Thread
pthread_is_multithreaded_np
()--Check the Current Number of Threads
pthread_join
()--Wait for and Detach a Thread
pthread_join_np
()--Wait for a Thread to End
pthread_once
()--Perform One Time Initialization
pthread_self
()--Get Pthread Handle
pthread_setconcurrency
()--Set The Process Concurrency Level
pthread_setpthreadoption_np
()--Set Pthread Run-Time Option Data
pthread_setschedparam
()--Set Target Thread Scheduling Parameters
sched_yield
()--Yield the Processor to Another Thread
Thread Specific Storage APIs
pthread_getspecific
()--Get Thread Local Storage Value by Key
pthread_key_create
()--Create a Thread Local Storage Key
pthread_key_delete
()--Delete Thread Local Storage Key
pthread_setspecific
()--Set Thread Local Storage by Key
Thread Cancelation APIs
pthread_cancel
()--Cancel a Thread
pthread_cleanup_peek_np
()--Copy the Cleanup Handler from the Cancelation Cleanup Stack
pthread_cleanup_pop
()--Pop a Cleanup Handler off of the Cancelation Cleanup Stack
pthread_cleanup_push
()--Push a Cleanup Handler onto the Cancelation Cleanup Stack
pthread_getcancelstate_np
()--Get Cancel State
pthread_setcancelstate
()--Set Cancel State
pthread_setcanceltype
()--Set Cancel Type
pthread_testcancel
()--Create a Cancelation Point
pthread_test_exit_np
()--Test the Thread Exit Status
Mutex Synchronization APIs
pthread_mutexattr_destroy
()--Destroy Mutex Attributes Object
pthread_mutexattr_getkind_np
()--Get Mutex Kind Attribute
pthread_mutexattr_getname_np
()--Get Name from Mutex Attributes Object
pthread_mutexattr_getpshared
()--Get Process Shared Attribute from Mutex Attributes Object
pthread_mutexattr_gettype
()--Get Mutex Type Attribute
pthread_mutexattr_init
()--Initialize Mutex Attributes Object
pthread_mutexattr_setkind_np
()--Get Mutex Kind Attribute
pthread_mutexattr_setname_np
()--Set Name in Mutex Attributes Object
pthread_mutexattr_setpshared
()--Set Process Shared Attribute in Mutex Attributes Object
pthread_mutexattr_settype
()--Set Mutex Type Attribute
pthread_set_mutexattr_default_np
()--Set Default Mutex Attributes Object Kind Attribute
pthread_mutex_destroy
()--Destroy Mutex
pthread_mutex_init
()--Initialize Mutex
pthread_mutex_lock
()--Lock Mutex
pthread_mutex_timedlock_np
()--Lock Mutex with Time-out
pthread_mutex_trylock
()--Lock Mutex with No Wait
pthread_mutex_unlock
()--Unlock Mutex
pthread_lock_global_np
()--Lock a Global Mutex
pthread_unlock_global_np
()--Unlock a Global Mutex
Condition Variable Synchronization APIs
pthread_condattr_destroy
()--Destroy Condition Variable Attributes Object
pthread_condattr_getpshared
()--Get Process Shared Attribute from Condition Attributes Object
pthread_condattr_init
()--Initialize Condition Variable Attributes Object
pthread_condattr_setpshared
()--Set Process Shared Attribute in Condition Attributes Object
pthread_cond_broadcast
()--Broadcast Condition to All Waiters
pthread_cond_destroy
()--Destroy a Condition Variable
pthread_cond_init
()--Initialize a Condition Variable
pthread_cond_signal
()--Signal Condition to One Waiter
pthread_cond_timedwait
()--Timed Wait for a Condition
pthread_cond_wait
()--Wait for a Condition
pthread_get_expiration_np
()--Get Condition Expiration Time from Delta
Read/Write Lock Synchronization APIs
pthread_rwlockattr_destroy
()--Destroy Read/Write Lock Attribute
pthread_rwlockattr_getpshared
()--Get Pshared Read/Write Lock Attribute
pthread_rwlockattr_init
()--Initialize Read/Write Lock Attribute
pthread_rwlockattr_setpshared
()--Set Pshared Read/Write Lock Attribute
pthread_rwlock_destroy
()--Destroy a Read/Write Lock
pthread_rwlock_init
()--Initialize a Read/Write Lock
pthread_rwlock_rdlock
()--Get a Shared Read Lock
pthread_rwlock_timedrdlock_np
()--Get a Shared Read Lock with Time-out
pthread_rwlock_timedwrlock_np
()--Get an Exclusive Write Lock with Time-out
pthread_rwlock_tryrdlock
()--Get a Shared Read Lock with No Wait
pthread_rwlock_trywrlock
()--Get an Exclusive Write Lock with No Wait
pthread_rwlock_unlock
()--Unlock an Exclusive Write or Shared Read Lock
pthread_rwlock_wrlock
()--Get an Exclusive Write Lock
Signals APIs
pthread_kill
()--Send a Signal to a Thread
pthread_sigmask
()--Set or Get the Signal Mask
pthread_signal_to_cancel_np
()--Convert Signals to Cancel Requests
Unsupported APIs
pthread_atfork
()--Register Atfork Handlers
pthread_atfork_np
()--Register Atfork Handlers
pthread_attr_getschedpolicy
()--Get Scheduling Policy
pthread_attr_getscope
()--Get Scheduling Scope
pthread_attr_getstackaddr
()--Get Stack Address
pthread_attr_getstacksize
()--Get Stack Size
pthread_attr_setschedpolicy
()--Set Scheduling Policy
pthread_attr_setscope
()--Set Scheduling Scope
pthread_attr_setstackaddr
()--Set Stack Address
pthread_attr_setstacksize
()--Set Stack Size
pthread_mutexattr_getprioceiling
()--Get Mutex Prioceiling Attribute
pthread_mutexattr_getprotocol
()--Get Mutex Protocol Attribute
pthread_mutexattr_setprioceiling
()--Set Mutex Prioceiling Attribute
pthread_mutexattr_setprotocol
()--Set Mutex Protocol Attribute
pthread_mutex_getprioceiling
()--Get Mutex Prioceiling
pthread_mutex_setprioceiling
()--Set Mutex Prioceiling
[Prev]
[Contents]
[Next]
Copyright © 1998, IBM Corporation. All rights reserved.
Comments? Contact
rchthrds@us.ibm.com