mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 14:53:34 +08:00
Removed extra abstracton layer in systemlib
The calls to task_spawn_cmd, kill_all, and systemreset were wrappers
around the px4_{task_spawn_cmd|kill_all|systemreset} implementations.
Removed the wrappers and changed all calls to the px4_ equivalents.
NuttX specific code was moved into px4_tasks.h
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -43,16 +43,26 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __PX4_ROS
|
||||
|
||||
#error "PX4 tasks not supported in ROS"
|
||||
|
||||
#elif defined(__PX4_NUTTX)
|
||||
typedef int px4_task_t;
|
||||
|
||||
/** Default scheduler type */
|
||||
#if CONFIG_RR_INTERVAL > 0
|
||||
# define SCHED_DEFAULT SCHED_RR
|
||||
#else
|
||||
# define SCHED_DEFAULT SCHED_FIFO
|
||||
#endif
|
||||
|
||||
#define px4_task_exit(x) _exit(x)
|
||||
|
||||
#elif defined(__PX4_POSIX) || defined(__PX4_QURT)
|
||||
#include <pthread.h>
|
||||
#include <sched.h>
|
||||
|
||||
/** Default scheduler type */
|
||||
#define SCHED_DEFAULT SCHED_FIFO
|
||||
#ifdef __PX4_LINUX
|
||||
#define SCHED_PRIORITY_MAX sched_get_priority_max(SCHED_FIFO)
|
||||
|
||||
Reference in New Issue
Block a user