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:
Mark Charlebois
2015-05-06 14:43:11 -07:00
parent 3654aec3a5
commit c5237f7f6f
38 changed files with 55 additions and 65 deletions
+10
View File
@@ -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)