mirror of https://github.com/ArduPilot/ardupilot
AP_Common: allow more than one WITH_SEMAPHORE per context
Let the variable have a random name since we are not going to reference it. This allows more than one WITH_SEMAPHORE() per context and also to avoid shadowing if we open inner contexts.
This commit is contained in:
parent
1715714488
commit
cb10d1d27b
|
@ -46,5 +46,5 @@ private:
|
|||
AP_HAL::Semaphore &_mtx;
|
||||
};
|
||||
|
||||
#define WITH_SEMAPHORE(sem) WithSemaphore _getsem(sem)
|
||||
#define WITH_SEMAPHORE(sem) WithSemaphore _getsem ## __UNIQ__(sem)
|
||||
|
||||
|
|
Loading…
Reference in New Issue