8 Commits

Author SHA1 Message Date
Beat Küng
a9129ea003 logger watchdog: also check main thread
There was a time window where if a task with higher priority than the main
logger thread would busy-loop, it would block both logging threads and the
watchdog would not trigger if the writer was in idle state.
This can happen for fast SD card writes.
2022-04-28 19:49:24 -04:00
Jukka Laitinen
d167f91eb8 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>
2022-03-17 08:01:51 +01:00
David Sidrane
bb913ae11a system_load:Track Dynamic PID hash 2021-08-13 14:22:00 -04:00
Beat Küng
3198610f85 src/platforms: move all headers to platforms/common/include/px4_platform_common
and remove the px4_ prefix, except for px4_config.h.

command to update includes:
for k in app.h atomic.h cli.h console_buffer.h defines.h getopt.h i2c.h init.h log.h micro_hal.h module.h module_params.h param.h param_macros.h posix.h sem.h sem.hpp shmem.h shutdown.h tasks.h time.h workqueue.h; do for i in $(grep -rl 'include <px4_'$k src platforms boards); do sed -i 's/#include <px4_'$k'/#include <px4_platform_common\/'$k/ $i; done; done
for in $(grep -rl 'include <px4_config.h' src platforms boards); do sed -i 's/#include <px4_config.h/#include <px4_platform_common\/px4_config.h'/ $i; done

Transitional headers for submodules are added (px4_{defines,log,time}.h)
2019-10-30 11:48:47 +01:00
Christian Rauch
8a2e3800d8 check CONFIG_SCHED_INSTRUMENTATION for print_load_nuttx 2018-12-21 05:43:21 -08:00
Beat Küng
9b5df10631 logger watchdog: avoid using printf from IRQ context
PX4_ERR calls printf, which calls lib_sem_initialize, which calls sem_wait
2018-05-18 22:23:32 +02:00
Beat Küng
b8a94bf8d4 logger: move pthread_t cast to pid_t into watchdog_initialize
avoids compile error on OSX, trying to cast pthread_t to pid_t
2018-05-18 22:23:32 +02:00
Beat Küng
dd30012b27 logger: add watchdog that boosts its priority when the writer is blocked for >1s
This is to guard against busy-looping tasks, so that we at least have a
log. In case the watchdog is triggered, it also logs CPU load of all
tasks.
2018-05-18 22:23:32 +02:00