Commit Graph

9 Commits

Author SHA1 Message Date
Patrick José Pereira dc6f5aec92 AP_HAL_SITL: Add missing const in member functions
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2021-02-03 18:45:14 +11:00
Peter Barker a9a2c8c392 AP_HAL_SITL: only disown a sempahore once we're done with it 2020-11-12 21:19:55 +11:00
Peter Barker b7f0015a69 AP_HAL_SITL: add bus ownership check for simulated i2c transfers
Also stop copying the bus object while iterating
2020-10-13 19:55:34 +11:00
Andrew Tridgell 4aa78dc891 AP_HAL_SITL: make all semaphores recursive
the cost is very similar and this prevents an easy coding error which
can occur on less used code paths
2020-01-19 20:19:30 +11:00
Peter Barker 15308af230 AP_HAL_SITL: avoid lockstep scheduling issue with semaphores
If there is another thread holding a lock that the main thread wants to
take while pretending to be the IO thread, we will wait forever as we do
not move SITL time forward while pretending to be the IO thread.

This patch simply allows time to move forward if we've failed to take a
semaphore immediately and need to wait.
2019-09-10 21:01:37 +10:00
Andrew Tridgell edeab9d152 HAL_SITL: support HAL_Semaphore_Recursive 2018-08-25 15:44:36 +10:00
Peter Barker 2f79a5bd90 AP_HAL_SITL: use HAL_SEMAPHORE_BLOCK_FOREVER 2017-05-01 15:05:51 +01:00
Pierre Kancir 8ade9d1fe8 AP_HAL_SITL: style fixes 2017-01-12 01:06:20 +00:00
Andrew Tridgell 05e04ee1a7 HAL_SITL: added semaphore support 2015-12-21 07:38:30 +11:00