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_setpshared.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_setpshared.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_setpshared.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_setpshared.html on line 8
Set the process-shared attribute of a read-write lock attribute object
#include <pthread.h>
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t* attr,
int pshared );
- attr
- A pointer to the pthread_rwlockattr_t object that you
want to set the attribute for.
- pshared
- The new value of the process-shared attribute; one of:
- PTHREAD_PROCESS_SHARED — let any thread with
access to the read-write lock object's memory operate it, even if those
threads are in different processes.
- PTHREAD_PROCESS_PRIVATE — limit access to threads in
the current process.
libc
Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.
The pthread_rwlockattr_setpshared() function sets the
process-shared attribute for the read-write lock attribute object
specified by attr to pshared.
- EOK
- Success.
- EINVAL
- The pshared argument is invalid.
POSIX 1003.1 THR TSH
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |
pthread_rwlockattr_destroy(),
pthread_rwlockattr_getpshared(),
pthread_rwlockattr_init()
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_setpshared.html on line 147
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_setpshared.html on line 147