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:
Lucas De Marchi 2018-08-30 09:02:01 -07:00 committed by Andrew Tridgell
parent 1715714488
commit cb10d1d27b
1 changed files with 1 additions and 1 deletions

View File

@ -46,5 +46,5 @@ private:
AP_HAL::Semaphore &_mtx; AP_HAL::Semaphore &_mtx;
}; };
#define WITH_SEMAPHORE(sem) WithSemaphore _getsem(sem) #define WITH_SEMAPHORE(sem) WithSemaphore _getsem ## __UNIQ__(sem)