mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-16 21:07:35 +08:00
logger: move pthread_t cast to pid_t into watchdog_initialize
avoids compile error on OSX, trying to cast pthread_t to pid_t
This commit is contained in:
@@ -133,10 +133,13 @@ bool watchdog_update(watchdog_data_t &watchdog_data)
|
||||
|
||||
}
|
||||
|
||||
void watchdog_initialize(const pid_t pid_logger_main, const pid_t pid_logger_writer, watchdog_data_t &watchdog_data)
|
||||
void watchdog_initialize(const pid_t pid_logger_main, const pthread_t writer_thread, watchdog_data_t &watchdog_data)
|
||||
{
|
||||
#ifdef __PX4_NUTTX
|
||||
|
||||
// The pthread_t ID is equal to the PID on NuttX
|
||||
const pthread_t pid_logger_writer = writer_thread;
|
||||
|
||||
sched_lock(); // need to lock the tcb access
|
||||
|
||||
for (int i = 0; i < CONFIG_MAX_TASKS; i++) {
|
||||
|
||||
Reference in New Issue
Block a user