tis_read_lock(3) [osf1 man page]
tis_read_lock(3) Library Functions Manual tis_read_lock(3) NAME
tis_read_lock - Acquires a read-write lock for read access. LIBRARY
Standard C Library (libc.so, libc.a) SYNOPSIS
#include <tis.h> int tis_read_lock( tis_rwlock_t *lock); STANDARDS
None PARAMETERS
Address of the read-write lock. DESCRIPTION
This routine acquires a read-write lock for read access. This routine waits for any existing lock holder for write access to relinquish its lock before granting the lock for read access. This routine returns when the lock is acquired. If the lock is already held for read access, the lock is granted. For each call to tis_read_lock(3) that successfully acquires the lock for read access, a corresponding call to tis_read_unlock(3) must be issued. Note that the type tis_rwlock_p is a pointer to type tis_rwlock_t. RETURN VALUES
If an error condition occurs, this routine returns an integer value indicating the type of error. Possible return values are as follows: Successful completion. The value specified by lock is invalid. ERRORS
None RELATED INFORMATION
Functions: tis_read_trylock(3), tis_read_unlock(3), tis_rwlock_destroy(3), tis_rwlock_init(3), tis_write_lock(3), tis_write_trylock(3), tis_write_unlock(3) Manuals: Guide to DECthreads and Programmer's Guide delim off tis_read_lock(3)
Check Out this Related Man Page
pthread_rwlockattr_setpshared(3) Library Functions Manual pthread_rwlockattr_setpshared(3) NAME
pthread_rwlockattr_setpshared - Sets the process-shared attribute in a read-write lock attributes object. LIBRARY
DECthreads POSIX 1003.1c Library (libpthread.so) SYNOPSIS
#include <pthread.h> int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared); PARAMETERS
Address of the read-write lock attributes object whose process-shared attribute is to be set. Value to set in the process-shared attribute of attr. Must be the value PTHREAD_PROCESS_SHARED, to permit access to the read-write lock by any thread in any process that can access the memory where the lock object is allocated, or PTHREAD_PROCESS_PRIVATE, to permit access to the read-write lock only by threads in the same process as the thread that initialized the read-write lock object. DESCRIPTION
This routine uses the value in pshared to set the process-shared attribute in the read-write lock attributes object referenced by attr. The object referenced by attr must be initialized before this routine is called. The value of pshared must be either PTHREAD_PROCESS_SHARED or PTHREAD_PROCESS_PRIVATE, as defined in the pthread.h include file. If the process-shared attribute is set to PTHREAD_PROCESS_PRIVATE, the read-write lock object can only be operated upon by threads created within the same process as the thread that initialized the read-write lock object. If threads of differing processes attempt to operate on such a read-write lock object, the behavior is undefined. The default value of the process-shared attribute of a read-write lock attributes object is PTHREAD_PROCESS_PRIVATE. If the process-shared attribute of a read-write lock attributes object is set to PTHREAD_PROCESS_SHARED, the read-write lock object can be operated upon by any thread that has access to the memory where that object is allocated, even if that object is allocated in memory that is shared by multiple processes. RETURN VALUES
If an error condition occurs, this routine returns an integer value indicating the type of error. Possible return values are as follows: Successful completion. The value specified by attr is not a valid attributes object, or the value pshared is outside the range of legal values for that attribute. ERRORS
None RELATED INFORMATION
Functions: pthread_rwlockattr_getpshared(3), pthread_rwlockattr_init(3) Manuals: Guide to DECthreads and Programmer's Guide delim off pthread_rwlockattr_setpshared(3)