AP_Logger: make all semaphores recursive

the cost is very similar and this prevents an easy coding error which
can occur on less used code paths
This commit is contained in:
Andrew Tridgell 2020-01-19 08:57:26 +11:00
parent 58708c483f
commit 71a0645a59
2 changed files with 3 additions and 3 deletions

View File

@ -419,7 +419,7 @@ private:
const char *units;
const char *mults;
} *log_write_fmts;
HAL_Semaphore_Recursive log_write_fmts_sem;
HAL_Semaphore log_write_fmts_sem;
// return (possibly allocating) a log_write_fmt for a name
struct log_write_fmt *msg_fmt_for_name(const char *name, const char *labels, const char *units, const char *mults, const char *fmt);
@ -510,7 +510,7 @@ private:
uint32_t _log_data_page;
GCS_MAVLINK *_log_sending_link;
HAL_Semaphore_Recursive _log_send_sem;
HAL_Semaphore _log_send_sem;
// last time arming failed, for backends
uint32_t _last_arming_failure_ms;

View File

@ -52,7 +52,7 @@ private:
uint16_t FileNumber;
};
HAL_Semaphore_Recursive sem;
HAL_Semaphore sem;
ByteBuffer writebuf;
// state variables