Skip to content

posix: rwlock: implement pthread_rwlockattr_setpshared() #70421

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

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

@cfriedt cfriedt requested review from jukkar and ycsin March 19, 2024 10:25
@cfriedt cfriedt force-pushed the rwlockattr-pshared branch from 0f27eaf to f4fed00 Compare March 19, 2024 10:31
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

@cfriedt cfriedt force-pushed the rwlockattr-pshared branch from 84cff27 to aadd0a9 Compare March 20, 2024 20:47
@cfriedt cfriedt requested a review from jukkar March 20, 2024 20:48
@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
cfriedt added 4 commits March 21, 2024 00:52
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 <[email protected]>
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 <[email protected]>
Add tests for pthread_rwlockattr_setpshared() and
pthread_rwlockattr_getpshared().

Signed-off-by: Christopher Friedt <[email protected]>
Mark pthread_rwlockattr_setpshared() and
pthread_rwlockattr_getpshared() as supported in the POSIX
Options documentation.

Signed-off-by: Christopher Friedt <[email protected]>
@cfriedt cfriedt force-pushed the rwlockattr-pshared branch from 2cdb008 to b352f2c Compare March 21, 2024 04:52
@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.

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