Skip to content

Conversation

@jmichalski-ant
Copy link
Contributor

Currently EBUSY return condition of sem_destroy is based on semaphore count, resulting in sem_destroy in some cases reporting this error even if no thread is blocked by it. This PR fixes that by checking semaphore's wait queue instead of its count. The test was also modified to assert the correct behavior.

The EBUSY return condition was incorrect and e.g. sem_destroy was in some
cases reporting this error even if no thread was blocked by this semaphore.
This commit fixes that by checking the waitqueue instead of the semaphore
count.

Signed-off-by: Jakub Michalski <[email protected]>
This commit modifies this test to properly check EBUSY condition

Signed-off-by: Jakub Michalski <[email protected]>
@sonarqubecloud
Copy link

@jmichalski-ant jmichalski-ant marked this pull request as ready for review January 29, 2026 15:10
@zephyrbot zephyrbot added area: POSIX POSIX API Library area: Tests Issues related to a particular existing or missing test labels Jan 29, 2026
@zephyrbot zephyrbot requested review from cfriedt, nashif and ycsin January 29, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants