mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-11 18:34:19 -04:00
AP_HAL: clarify semaphore recursion
We haven't had non-recursive semaphores since PR #13323
(commits 1284f1bd8a
).
This commit is contained in:
parent
78d9e5a875
commit
f630357dc7
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user