| <assertions> |
| <assertion id="1" tag="ref:XSH6:35138:35139"> |
| The function |
| |
| int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *restrict attr, |
| int *restrict pshared); |
| |
| It shall obtain the value of the process-shared attribute from 'attr'. |
| </assertion> |
| |
| <assertion id="2" tag="ref:XSH6:35151:35158"> |
| The process-shared attribute shall be set to PTHREAD_PROCESS_SHARED |
| to permit a read-write lock to be operated upon by any thread |
| that has access to the memory where the read-write lock is allocated, |
| even if the read-write lock is allocated in memory that is shared by |
| multiple processes. |
| </assertion> |
| |
| <assertion id="3" tag="ref:XSH6:35154:35158"> |
| If the process-shared attribute is PTHREAD_PROCESS_PRIVATE, |
| the read-write lock shall only be operated upon by threads created |
| within the same process as the thread that initialized the read-write lock; |
| if threads of different processes attempt to operate on such a read-write lock, |
| the behavior is undefined. |
| </assertion> |
| <assertion id="4" tag="ref:XSH6:35157:35158"> |
| The default value of the process-shared attribute shall be PTHREAD_PROCESS_PRIVATE. |
| </assertion> |
| |
| <assertion id="5" tag="ref:XSH6:35162:35164"> |
| Upon success, it returns 0, and stores the value of the process-shared |
| attribute of 'attr' into 'pshared'. |
| </assertion> |
| |
| <assertion id="6" tag="ref:XSH6:35168:35173"> |
| It MAY fail if: |
| [EINVAL] - 'attr' is invalid. |
| Shall not return an error code of [EINTR] |
| </assertion> |
| </assertions> |
| |