Browse Source

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
zr-v5.1
Andrew Tridgell 5 years ago
parent
commit
71a0645a59
  1. 4
      libraries/AP_Logger/AP_Logger.h
  2. 2
      libraries/AP_Logger/AP_Logger_Block.h

4
libraries/AP_Logger/AP_Logger.h

@ -419,7 +419,7 @@ private: @@ -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: @@ -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;

2
libraries/AP_Logger/AP_Logger_Block.h

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

Loading…
Cancel
Save