Skip to content

posix: pthread: support for pthread_setcanceltype() #65644

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 3 commits into from
Nov 26, 2023

Conversation

cfriedt
Copy link
Member

@cfriedt cfriedt commented Nov 23, 2023

pthread_setcanceltype() is required by the POSIX_THREADS_BASE Option Group as detailed in Section E.1 of IEEE-1003.1-2017.

The POSIX_THREADS_BASE Option Group 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 #59945

Note: pthread cancellation is still basically synchronous, so cancel type has no effect.

@zephyrbot zephyrbot added area: POSIX POSIX API Library area: Portability Standard compliant code, toolchain abstraction area: CMSIS API Layer CMSIS-RTOS API Layer labels Nov 23, 2023
@zephyrbot zephyrbot requested a review from nashif November 23, 2023 04:28
@cfriedt cfriedt added area: Documentation area: Tests Issues related to a particular existing or missing test and removed area: CMSIS API Layer CMSIS-RTOS API Layer labels Nov 23, 2023
@cfriedt cfriedt requested review from kartben and ycsin November 23, 2023 04:50
@cfriedt cfriedt force-pushed the pthread-setcanceltype branch from 8ba465c to 86c965f Compare November 23, 2023 05:45
@zephyrbot zephyrbot added the area: CMSIS API Layer CMSIS-RTOS API Layer label Nov 23, 2023
ycsin
ycsin previously approved these changes Nov 23, 2023
@cfriedt cfriedt removed the area: CMSIS API Layer CMSIS-RTOS API Layer label Nov 23, 2023
@cfriedt cfriedt requested review from keith-packard and peter-mitsis and removed request for kartben and nashif November 23, 2023 18:01
@cfriedt cfriedt force-pushed the pthread-setcanceltype branch from 86c965f to 92ed373 Compare November 25, 2023 22:55
@zephyrbot zephyrbot added the area: CMSIS API Layer CMSIS-RTOS API Layer label Nov 25, 2023
@zephyrbot zephyrbot requested a review from nashif November 25, 2023 22:55
pthread_setcanceltype() is required by the POSIX_THREADS_BASE
Option Group as detailed in Section E.1 of IEEE-1003.1-2017.

The POSIX_THREADS_BASE Option Group 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]>
The function pthread_setcancelstate() has been supported for
some time already in Zephyr. For some reason, it was not being
checked in the "headers" testsuite.

Additionally, check for pthread_setcanceltype() since it was
added in a prior commit.

Signed-off-by: Christopher Friedt <[email protected]>
The function pthread_setcanceltype() is supported and mandatory
for conforming implementations.

Mark it as supported since the preceding commit.

Signed-off-by: Christopher Friedt <[email protected]>
@cfriedt cfriedt force-pushed the pthread-setcanceltype branch from 92ed373 to 8682a91 Compare November 25, 2023 22:59
@cfriedt cfriedt requested review from jhedberg and ycsin November 25, 2023 23:00
@cfriedt cfriedt merged commit ecd2961 into zephyrproject-rtos:main Nov 26, 2023
@cfriedt cfriedt deleted the pthread-setcanceltype branch November 26, 2023 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: CMSIS API Layer CMSIS-RTOS API Layer area: Documentation area: Portability Standard compliant code, toolchain abstraction area: POSIX POSIX API Library area: Tests Issues related to a particular existing or missing test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

posix: implement pthread_setcanceltype()
4 participants