Opened 4 years ago
Closed 19 months ago
#16723 closed enhancement (fixed)
THR: build FAILED - conformance/interfaces/pthread_barrierattr_getpshared/2-1.c
Reported by: | cocobean | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta5 |
Component: | System/POSIX | Version: | R1/Development |
Keywords: | POSIX, pthreads, pthread_barrierattr_getpshared | Cc: | |
Blocked By: | Blocking: | ||
Platform: | All |
Description (last modified by )
The process-shared attribute is set to PTHREAD_PROCESS_SHARED to permit a barrier to be operated upon by any thread that has access to the memory where the barrier is allocated. If the process-shared attribute is PTHREAD_PROCESS_PRIVATE, the barrier shall only be operated upon by threads created within the same process as the thread that initialized the barrier; if threads of different processes attempt to operate on such a barrier, the behavior is undefined.
The default value of the attribute shall be PTHREAD_PROCESS_PRIVATE. Both constants PTHREAD_PROCESS_SHARED and PTHREAD_PROCESS_PRIVATE are defined in <pthread.h>.
Steps:
1. Create a piece of shared memory object, create pthread barrier object 'barrier' and set the PTHREAD_PROCESS_SHARED attribute. 2. Parent map the shared memory to its memory space, put 'barrier' into it; 3. Parent fork to create child process; 4. Child process map the 'barrier' to its memory space; 5. Parent and Child execute same code: loop N times, calling pthread_barrier_wait() 6. Parent and Child should not block on pthread_barrier_wait()
Expected Result: Test Passed
Tested on: Haiku hrev54840 x86 with Open POSIX Test Suite 1.5.2
Change History (4)
comment:1 by , 4 years ago
Description: | modified (diff) |
---|
comment:2 by , 2 years ago
comment:3 by , 19 months ago
Test PASSED on: Haiku hrev57072 x64 with Open POSIX Test Suite 1.5.2 Please close this ticket.
comment:4 by , 19 months ago
Milestone: | Unscheduled → R1/beta5 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Optional - per UNIX 2003 compliance. Please close this ticket.