Subroutines defined in the UNIX 98 Specification

We have categorized the Pthread subroutines defined in the UNIX 98 Specification, which are supported on AIX 5L Version 5.2, into the following:

Read-write lock sub-routinesSee Table D-5 on page 480.
Additional POSIX threads sub-routinesSee Table D-6 on page 481.

Table D-5. Read-write lock sub-routines
NameDescription
pthread_rwlockattr_init()Initializes the read-write specified lock with the attributes referenced by the given read-write lock attribute object. If that object is NULL, the default read-write lock attributes are used.
pthread_rwlockattr_destroy()Destroys the specified read-write lock attribute object and releases any resources used by the lock.
pthread_rwlockattr_setpshared()Sets the process-shared attribute in the given initialized read-write lock attributes object.
pthread_rwlockattr_getpshared()Obtains the value of the process-shared attribute from the given initialized read-write lock attributes object.
pthread_rwlock_init()Initializes the specified read-write lock with the attributes from a given read-write lock attributes object. If that object is NULL, the default read-write lock attributes are used.
pthread_rwlock_destroy()Destroys the specified read-write lock object and releases any resources used by the lock.
pthread_rwlock_rdlock()Applies a read lock to the given read-write lock. The calling thread acquires the read lock if a writer does not hold the lock and there are no writers blocked on the lock.
pthread_rwlock_tryrdlock()Applies a read lock as in the pthread_rwlock_rdlock() function with the exception that the function fails if any thread holds a write lock on the specified read-write lock or there are writers that sblocked the lock.
pthread_rwlock_wrlock()Applies a write lock to the given read-write lock. The calling thread acquires the write lock if no other thread (reader or writer) holds the read-write lock. Otherwise, the thread blocks (that is, does not return from the pthread_rwlock_wrlock() call) until it can acquire the lock.
pthread_rwlock_trywrlock()Applies a write lock like the pthread_rwlock_wrlock() function, with the exception that the function fails if any thread currently holds the specified read-write lock (for reading or writing).
pthread_rwlock_unlock()Releases a lock held on the specified read-write lock object.

Table D-6. Additional POSIX threads sub-routines defined in UNIX 98
NameDescription
pthread_setconcurrency()Allows an application to inform the threads implementation of its desired concurrency level. The actual level of concurrency provided by the implementation as a result of this function call is unspecified.
pthread_getconcurrency()Returns the value set by a previous call to the pthread_setconcurrency() function.
pthread_attr_setguardsize()Sets the guardsize attribute in a thread attribute object. The guardsize attribute controls the size of the guard area for the created thread’s stack. The guardsize attribute provides protection against overflow of the thread’s stack pointer.
pthread_attr_getguardsize()Gets the guardsize attribute of a thread attributes object.
pthread_mutexattr_settype()Sets the mutex type attribute of a mutex attributes object to a given type.
pthread_mutexattr_gettype()Gets the type attribute of a given mutex attributes object.
pthread_suspend()Suspends execution of specified thread.
pthread_continue()Resumes execution of specified thread.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset