Commit Graph

5 Commits

Author SHA1 Message Date
Lucas De Marchi cb10d1d27b 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.
2018-09-06 08:23:02 +10:00
Lucas De Marchi 1715714488 AP_Common: make WithSemaphore use an AP_HAL::Semaphore reference
We don't need the specialized one inside WithSemaphore, so use the
abstract one which allows us to more easily convert between current API
and the HAL_Semaphore one.

While at it also remove additional pragma and allow constructor to
receive a pointer for convenience (we will just dereference it).
2018-09-06 08:23:02 +10:00
Andrew Tridgell 0aeceb22d9 AP_Common: added #pragma once to Semaphores.h 2018-08-25 15:44:36 +10:00
Andrew Tridgell 912e4f16ec AP_Common: added #pragma once 2018-08-23 08:21:48 +10:00
Andrew Tridgell 5ac15714fd AP_Common: moved WITH_SEMAPHORE to Semaphore.h 2018-08-16 12:40:10 +10:00