GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
PTHREAD_RWLOCKATTR_SETPSHARED(3) FreeBSD Library Functions Manual PTHREAD_RWLOCKATTR_SETPSHARED(3)

pthread_rwlockattr_setpshared
set the process shared attribute

POSIX Threads Library (libpthread, -lpthread)

#include <pthread.h>

int
pthread_rwlockattr_setpshared(pthread_rwlockattr_t *attr, int pshared);

The pthread_rwlockattr_setpshared() function sets the process shared attribute of attr to the value referenced by pshared. The pshared argument may be one of two values:
Any thread of any process that has access to the memory where the read/write lock resides can manipulate the lock.
Only threads created within the same process as the thread that initialized the read/write lock can manipulate the lock. This is the default value.

If successful, the pthread_rwlockattr_setpshared() function will return zero. Otherwise an error number will be returned to indicate the error.

The pthread_rwlockattr_setpshared() function will fail if:
[]
The value specified by attr or pshared is invalid.

pthread_rwlock_init(3), pthread_rwlockattr_getpshared(3), pthread_rwlockattr_init(3)

The pthread_rwlockattr_setpshared() function is expected to conform to Version 2 of the Single UNIX Specification (“SUSv2”).

The pthread_rwlockattr_setpshared() function first appeared in FreeBSD 3.0. Support for process-shared read/write locks appeared in FreeBSD 11.0.
May 31, 2016 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.