MutexIF::NO_TIMEOUT has different meanings for FreeRTOS and Linux #91
Labels
No Label
API Change
Breaking API Change
bug
build
cosmetics
Documentation
duplicate
feature
help wanted
hotfix
invalid
question
Refactor
Tests
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: fsfw/fsfw#91
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is a consistency issue. On Linux, MutexIF::NO_TIMEOUT means permanent blocking (not every intuitive in my opinion, permanent blocking should be on the right side of the number spectrum, not the value 0, but something like 0xffffffff, just like the portMAX_DELAY value from FreeRTOS). On FreeRTOS it means polling (try to unlock, if it doesnt work, return MutexIF::TIMEOUT immediately) like expected.
What do you think?
I suggest introducing a new timeout value with the name
MutexIF::MAX_TIMEOUT
(orSemaphoreIF::MAX_TIMEOUT
for semaphores) to perform permanent blocking.I already introduced this in the pull request #90 which includes Mutex improvements for FreeRTOS.
Second suggestion:
Rename former NO_TIMEOUT timeout value to
BLOCKING
and rename the polling version timeout to
POLLING