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: rwlock: implement pthread_rwlockattr_setpshared() #70421

Merged
merged 4 commits into from Mar 22, 2024

Conversation

cfriedt
Copy link
Member

@cfriedt cfriedt commented Mar 19, 2024

Implement pthread_rwlockattr_setpshared() and pthread_rwlockattr_getpshared().

Both functions are required by the _POSIX_READER_WRITER_LOCKS Option as detailed in Section E.1 of IEEE-1003.1-2017.

The _POSIX_READER_WRITER_LOCKS Option is required for PSE51, PSE52, PSE53, and PSE54 conformance, and is otherwise mandatory for any POSIX conforming system as per Section A.2.1.3 of IEEE-1003-1.2017.

Fixes #66964
Fixes #66965

Copy link
Member

@jukkar jukkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, minor nit about empty line

tests/posix/common/src/rwlock.c Outdated Show resolved Hide resolved
@cfriedt
Copy link
Member Author

cfriedt commented Mar 20, 2024

  • removed blank line (my autoformat seems to be broken atm 😢)

@jukkar - can you please re-approve

@cfriedt cfriedt force-pushed the rwlockattr-pshared branch 3 times, most recently from 9dfd418 to 2cdb008 Compare March 21, 2024 04:48
Move the implementation of the following functions into
the posix library rather than having themn as static
inline functions.

* pthread_rwlockattr_init()
* pthread_rwlockattr_destroy()

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Implement pthread_rwlockattr_setpshared() and
pthread_rwlockattr_getpshared().

Both functions are required by the _POSIX_READER_WRITER_LOCKS
Option as detailed in Section E.1 of IEEE-1003.1-2017.

The _POSIX_READER_WRITER_LOCKS Option is required for PSE51,
PSE52, PSE53, and PSE54 conformance, and is otherwise mandatory
for any POSIX conforming system as per Section A.2.1.3 of
IEEE-1003-1.2017.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Add tests for pthread_rwlockattr_setpshared() and
pthread_rwlockattr_getpshared().

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Mark pthread_rwlockattr_setpshared() and
pthread_rwlockattr_getpshared() as supported in the POSIX
Options documentation.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
@cfriedt cfriedt marked this pull request as ready for review March 21, 2024 11:21
@zephyrbot zephyrbot added the area: POSIX POSIX API Library label Mar 21, 2024
@cfriedt
Copy link
Member Author

cfriedt commented Mar 22, 2024

It looks like the 2d review period is up for this too.

@cfriedt cfriedt merged commit 8de8bcc into zephyrproject-rtos:main Mar 22, 2024
32 checks passed
@cfriedt cfriedt deleted the rwlockattr-pshared branch March 22, 2024 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: POSIX POSIX API Library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

posix: implement pthread_rwlockattr_setpshared() posix: implement pthread_rwlockattr_getpshared()
4 participants