Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pthread_rwlock_destroy(3) [mojave man page]

PTHREAD_RWLOCK_DESTROY(3)				   BSD Library Functions Manual 				 PTHREAD_RWLOCK_DESTROY(3)

NAME
pthread_rwlock_destroy -- destroy a read/write lock SYNOPSIS
#include <pthread.h> int pthread_rwlock_destroy(pthread_rwlock_t *lock); DESCRIPTION
The pthread_rwlock_destroy() function is used to destroy a read/write lock previously created with pthread_rwlock_init(). RETURN VALUES
If successful, the pthread_rwlock_destroy() function will return zero. Otherwise an error number will be returned to indicate the error. ERRORS
The pthread_rwlock_destroy() function will fail if: [EPERM] The caller does not have the privilege to perform the operation. The pthread_rwlock_destroy() function may fail if: [EBUSY] The system has detected an attempt to destroy the object referenced by lock while it is locked. [EINVAL] The value specified by lock is invalid. SEE ALSO
pthread_rwlock_init(3) STANDARDS
The pthread_rwlock_destroy() function is expected to conform to Version 2 of the Single UNIX Specification (``SUSv2''). HISTORY
The pthread_rwlock_destroy() function first appeared in FreeBSD 3.0. BSD
August 4, 1998 BSD

Check Out this Related Man Page

pthread_rwlock_destroy(3)				     Library Functions Manual					 pthread_rwlock_destroy(3)

NAME
pthread_rwlock_destroy - Destroys a read-write lock object. LIBRARY
DECthreads POSIX 1003.1c Library (libpthread.so) SYNOPSIS
#include <pthread.h> int pthread_rwlock_destroy( pthread_rwlock_t *rwlock); PARAMETERS
Address of the read-write lock object to be destroyed. DESCRIPTION
This routine destroys the specified read-write lock object by uninitializing it, and should be called when the object is no longer refer- enced in your program. After this routine is called, DECthreads may reclaim internal storage used by the specified read-write lock object. The effect of subsequent use of the lock is undefined until the lock is reinitialized by another call to pthread_rwlock_init. It is illegal to destroy a locked read-write lock. The results of this routine are unpredictable if the specified read-write lock object does not currently exist or is not initialized. This routine destroys the read-write lock object specified by the rwlock argument and releases any resources that the object used. A destroyed read-write lock object can be reinitialized using the pthread_rwlock_init(3) routine. The results of otherwise referencing a destroyed read-write lock object are undefined. 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. An attempt was made to destroy the object referenced by rwlock while it is locked or referenced. ERRORS
None RELATED INFORMATION
Functions: pthread_rwlock_init(3) Manuals: Guide to DECthreads and Programmer's Guide delim off pthread_rwlock_destroy(3)
Man Page