Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

posix: implement pthread_barrierattr_setpshared() #59939

Closed
Tracked by #51211
ycsin opened this issue Jul 3, 2023 · 0 comments · Fixed by #59973
Closed
Tracked by #51211

posix: implement pthread_barrierattr_setpshared() #59939

ycsin opened this issue Jul 3, 2023 · 0 comments · Fixed by #59973
Labels
area: POSIX POSIX API Library Feature Request A request for a new feature Good first issue Good for a first time contributor to take
Milestone

Comments

@ycsin
Copy link
Member

ycsin commented Jul 3, 2023

There are currently 20 missing POSIX functions with trivial implementations, pthread_barrierattr_setpshared() is one of them.

pthread_barrierattr_getpshared, pthread_barrierattr_setpshared - get and set the process-shared attribute of the barrier attributes object

The pthread_barrierattr_getpshared() function shall obtain the value of the process-shared attribute from the attributes object referenced by attr. The pthread_barrierattr_setpshared() function shall set the process-shared attribute in an initialized attributes object referenced by attr.

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. See Synchronization Object Copies and Alternative Mappings for further requirements. 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>.

Additional attributes, their default values, and the names of the associated functions to get and set those attribute values are implementation-defined.

The behavior is undefined if the value specified by the attr argument to pthread_barrierattr_getpshared() or pthread_barrierattr_setpshared() does not refer to an initialized barrier attributes object.

See https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_barrierattr_setpshared.html

See RFC #51211 for more info.

@ycsin ycsin added Feature Request A request for a new feature Good first issue Good for a first time contributor to take area: POSIX POSIX API Library labels Jul 3, 2023
@ycsin ycsin added this to the v3.5.0 milestone Jul 3, 2023
@ycsin ycsin moved this from To Do to LTS3 Goals in Release Plan Jul 3, 2023
harshilbhatt2001 added a commit to harshilbhatt2001/zephyr that referenced this issue Jul 3, 2023
Added pthread_barrieratter_init() zephyrproject-rtos#59936,
pthread_barrieratter_destroy() zephyrproject-rtos#59935,
pthread_barrieratter_getpshared() zephyrproject-rtos#59937 and
pthread_barrieratter_setpshared() zephyrproject-rtos#59939.

Signed-off-by: Harshil Bhatt <harshilbhatt2001@gmail.com>
harshilbhatt2001 added a commit to harshilbhatt2001/zephyr that referenced this issue Jul 3, 2023
Added pthread_barrieratter_init() zephyrproject-rtos#59936,
pthread_barrieratter_destroy() zephyrproject-rtos#59935,
pthread_barrieratter_getpshared() zephyrproject-rtos#59937 and
pthread_barrieratter_setpshared() zephyrproject-rtos#59939.

Signed-off-by: Harshil Bhatt <harshilbhatt2001@gmail.com>
@cfriedt cfriedt assigned cfriedt and unassigned cfriedt Jul 4, 2023
harshilbhatt2001 added a commit to harshilbhatt2001/zephyr that referenced this issue Jul 4, 2023
Added pthread_barrieratter_init() zephyrproject-rtos#59936,
pthread_barrieratter_destroy() zephyrproject-rtos#59935,
pthread_barrieratter_getpshared() zephyrproject-rtos#59937 and
pthread_barrieratter_setpshared() zephyrproject-rtos#59939.

Signed-off-by: Harshil Bhatt <harshilbhatt2001@gmail.com>
harshilbhatt2001 added a commit to harshilbhatt2001/zephyr that referenced this issue Jul 4, 2023
Added pthread_barrieratter_init() zephyrproject-rtos#59936,
pthread_barrieratter_destroy() zephyrproject-rtos#59935,
pthread_barrieratter_getpshared() zephyrproject-rtos#59937 and
pthread_barrieratter_setpshared() zephyrproject-rtos#59939.

Signed-off-by: Harshil Bhatt <harshilbhatt2001@gmail.com>
harshilbhatt2001 added a commit to harshilbhatt2001/zephyr that referenced this issue Jul 6, 2023
Added pthread_barrieratter_init() zephyrproject-rtos#59936,
pthread_barrieratter_destroy() zephyrproject-rtos#59935,
pthread_barrieratter_getpshared() zephyrproject-rtos#59937 and
pthread_barrieratter_setpshared() zephyrproject-rtos#59939.

Signed-off-by: Harshil Bhatt <harshilbhatt2001@gmail.com>
harshilbhatt2001 added a commit to harshilbhatt2001/zephyr that referenced this issue Jul 7, 2023
Added pthread_barrieratter_init() zephyrproject-rtos#59936,
pthread_barrieratter_destroy() zephyrproject-rtos#59935,
pthread_barrieratter_getpshared() zephyrproject-rtos#59937 and
pthread_barrieratter_setpshared() zephyrproject-rtos#59939.

Signed-off-by: Harshil Bhatt <harshilbhatt2001@gmail.com>
harshilbhatt2001 added a commit to harshilbhatt2001/zephyr that referenced this issue Jul 8, 2023
Added pthread_barrieratter_init() zephyrproject-rtos#59936,
pthread_barrieratter_destroy() zephyrproject-rtos#59935,
pthread_barrieratter_getpshared() zephyrproject-rtos#59937 and
pthread_barrieratter_setpshared() zephyrproject-rtos#59939.

Signed-off-by: Harshil Bhatt <harshilbhatt2001@gmail.com>
harshilbhatt2001 added a commit to harshilbhatt2001/zephyr that referenced this issue Jul 8, 2023
Added pthread_barrieratter_init() zephyrproject-rtos#59936,
pthread_barrieratter_destroy() zephyrproject-rtos#59935,
pthread_barrieratter_getpshared() zephyrproject-rtos#59937 and
pthread_barrieratter_setpshared() zephyrproject-rtos#59939.

Signed-off-by: Harshil Bhatt <harshilbhatt2001@gmail.com>
cfriedt pushed a commit that referenced this issue Jul 9, 2023
Added pthread_barrieratter_init() #59936,
pthread_barrieratter_destroy() #59935,
pthread_barrieratter_getpshared() #59937 and
pthread_barrieratter_setpshared() #59939.

Signed-off-by: Harshil Bhatt <harshilbhatt2001@gmail.com>
@cfriedt cfriedt removed the status in Release Plan Sep 12, 2023
@nashif nashif removed this from Release Plan Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: POSIX POSIX API Library Feature Request A request for a new feature Good first issue Good for a first time contributor to take
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants