AP_HAL: clarify semaphore recursion

We haven't had non-recursive semaphores since PR #13323
(commits 1284f1bd8a).
This commit is contained in:
Thomas Watson 2025-01-02 20:34:04 -06:00 committed by Peter Barker
parent 78d9e5a875
commit f630357dc7

View File

@ -32,12 +32,11 @@ public:
macro will block forever for a semaphore, and will automatically
release the semaphore when it goes out of scope
Note that we have two types of semaphores. A normal semaphore can
only be taken once. A recursive semaphore allows for the thread
holding the semaphore to take it again. It must be released the same
number of times it is taken.
All semaphores are recursive. This allows for the thread holding
the semaphore to take it again. It must be released the same number
of times it is taken.
The WITH_SEMAPHORE() macro can be used with either type of semaphore
The WITH_SEMAPHORE() macro cannot be used with binary semaphores
*/
class WithSemaphore {