Commit Graph

11 Commits

Author SHA1 Message Date
Andrew Tridgell 8f973da4b5 AP_HAL: moved the WITH_SEMAPHORE() logic into AP_HAL
this is needed to allow us to record the location of a blocking
semaphore to track down bugs where we have a semaphore deadlock
2019-05-15 15:33:48 +10:00
Peter Barker e4e453402c AP_HAL: rearrange headers for consistency
Move attribute definitions all into AP_Common, rather than being split between two files

Remove unused SITL_printf macros

Stop AP_Common including board information

Include AP_Common.h in AP_HAL::Sempahore for WARN_IF_UNUSED; this was the cause of a circular import problem fixed by other commits in this patch.
2019-02-15 08:15:45 +11:00
Andrew Tridgell e2ea654b77 AP_HAL: added take_blocking() method
this avoids the need to check return result
2018-05-25 13:53:17 +10:00
Andrew Tridgell a96ed8c188 AP_HAL: added virtual destructor for Semaphores 2016-11-28 08:26:56 +11:00
Andrew Tridgell bf0b0c1773 AP_HAL: fixed HAL_SEMAPHORE_BLOCK_FOREVER to be zero
all implementations assume this
2016-11-09 17:07:57 +11:00
Lucas De Marchi dbf2aedf1e AP_HAL: replace header guard with pragma once 2016-02-18 14:52:34 -02:00
Gustavo Jose de Sousa 0456eccca8 AP_HAL: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:28:43 +10:00
Andrew Tridgell e76c77e86a AP_HAL: mark semaphore take operations as WARN_IF_UNUSED
this prevents common bugs
2013-01-09 20:42:02 +11:00
Pat Hickey 3da864499d AP_HAL Semaphore: don't use limits, they don't work on c++ 2013-01-04 16:19:15 -08:00
Pat Hickey 81d77d4a70 AP_HAL: New semaphore interface
* it now looks like a semaphore!
2013-01-03 13:48:07 -08:00
Andrew Tridgell a3c26d44e4 AP_HAL: rename Sempahore.h to Semaphores.h
this is needed to allow build on MacOS, as its case-insensitive
filesystem picks up the NuttX semaphore.h
2013-01-02 18:22:13 +11:00