Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/p/pthread_rwlockattr_getpshared.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/p/pthread_rwlockattr_getpshared.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/p/pthread_rwlockattr_getpshared.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/p/pthread_rwlockattr_getpshared.html on line 8

pthread_rwlockattr_getpshared()

Get the process-shared attribute of a read-write lock attribute object

Synopsis:

#include <pthread.h>

int pthread_rwlockattr_getpshared( 
       const pthread_rwlockattr_t* attr,
       int* pshared );

Arguments:

attr
A pointer to the pthread_rwlockattr_t object that you want to get the attribute from.
pshared
A pointer to a location where the function can store the process-shared attribute.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The pthread_rwlockattr_getpshared() function gets the the process-shared attribute for the read-write lock attribute object specified by attr, storing it in pshared.

To let any thread with access to the read-write lock object's memory operate it, the process-shared attribute must be set to PTHREAD_PROCESS_SHARED, even if those threads are in different processes. Set the process-shared attribute to PTHREAD_PROCESS_PRIVATE to limit access to threads in the current process.

Returns:

EOK
Success.
EINVAL
The read-write lock attribute object specified by attr is invalid.

Classification:

POSIX 1003.1 THR TSH

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

pthread_rwlockattr_destroy(), pthread_rwlockattr_init(), pthread_rwlockattr_setpshared()

Processes and Threads chapter of Getting Started with QNX Neutrino


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/p/pthread_rwlockattr_getpshared.html on line 143

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/p/pthread_rwlockattr_getpshared.html on line 143