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_destroy() #59935

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

posix: implement pthread_barrierattr_destroy() #59935

ycsin opened this issue Jul 3, 2023 · 0 comments · Fixed by #59973
Assignees
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_destroy() is one of them.

pthread_barrierattr_destroy, pthread_barrierattr_init - destroy and initialize the barrier attributes object

The pthread_barrierattr_destroy() function shall destroy a barrier attributes object. A destroyed attr attributes object can be reinitialized using pthread_barrierattr_init(); the results of otherwise referencing the object after it has been destroyed are undefined. An implementation may cause pthread_barrierattr_destroy() to set the object referenced by attr to an invalid value.

The pthread_barrierattr_init() function shall initialize a barrier attributes object attr with the default value for all of the attributes defined by the implementation.

If pthread_barrierattr_init() is called specifying an already initialized attr attributes object, the results are undefined.

After a barrier attributes object has been used to initialize one or more barriers, any function affecting the attributes object (including destruction) shall not affect any previously initialized barrier.

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

See https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_barrierattr_destroy.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 to LTS3 Goals in Release Plan Jul 3, 2023
@cfriedt cfriedt assigned cfriedt and unassigned cfriedt Jul 4, 2023
@cfriedt cfriedt self-assigned this Jul 8, 2023
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