mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 10:46:33 +08:00
logger/watchdog: Disable watchdog for NuttX protected/kernel builds
It accesses kernel internal structures directly; this needs to be worked out with some proper userspace-kernel interface Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This commit is contained in:
committed by
Beat Küng
parent
56c6120e83
commit
d167f91eb8
@@ -49,7 +49,7 @@ namespace logger
|
|||||||
bool watchdog_update(watchdog_data_t &watchdog_data)
|
bool watchdog_update(watchdog_data_t &watchdog_data)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef __PX4_NUTTX
|
#if defined(__PX4_NUTTX) && defined(CONFIG_BUILD_FLAT)
|
||||||
|
|
||||||
if (system_load.initialized && watchdog_data.logger_main_task_index >= 0
|
if (system_load.initialized && watchdog_data.logger_main_task_index >= 0
|
||||||
&& watchdog_data.logger_writer_task_index >= 0) {
|
&& watchdog_data.logger_writer_task_index >= 0) {
|
||||||
@@ -133,7 +133,7 @@ bool watchdog_update(watchdog_data_t &watchdog_data)
|
|||||||
|
|
||||||
void watchdog_initialize(const pid_t pid_logger_main, const pthread_t writer_thread, 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
|
#if defined(__PX4_NUTTX) && defined(CONFIG_BUILD_FLAT)
|
||||||
|
|
||||||
// The pthread_t ID is equal to the PID on NuttX
|
// The pthread_t ID is equal to the PID on NuttX
|
||||||
const pthread_t pid_logger_writer = writer_thread;
|
const pthread_t pid_logger_writer = writer_thread;
|
||||||
|
|||||||
Reference in New Issue
Block a user