aboutsummaryrefslogtreecommitdiff
path: root/apps/sdlog/sdlog.c
diff options
context:
space:
mode:
authorpx4dev <px4@purgatory.org>2012-10-01 00:02:38 -0700
committerpx4dev <px4@purgatory.org>2012-10-01 00:02:38 -0700
commit93c200d281e7488db95806840a6976b02d1afbe0 (patch)
tree606a24e6778f54c3d7fa9939f303d89f76161d4e /apps/sdlog/sdlog.c
parent6005077d54e6b96a5284752eedbd026ef7952341 (diff)
downloadpx4-firmware-93c200d281e7488db95806840a6976b02d1afbe0.tar.gz
px4-firmware-93c200d281e7488db95806840a6976b02d1afbe0.tar.bz2
px4-firmware-93c200d281e7488db95806840a6976b02d1afbe0.zip
Add new 'task_spawn' interface for starting new tasks in the PX4 world
Diffstat (limited to 'apps/sdlog/sdlog.c')
-rw-r--r--apps/sdlog/sdlog.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/sdlog/sdlog.c b/apps/sdlog/sdlog.c
index f1c1f9a23..f4af17597 100644
--- a/apps/sdlog/sdlog.c
+++ b/apps/sdlog/sdlog.c
@@ -61,6 +61,8 @@
#include <uORB/topics/actuator_controls.h>
#include <uORB/topics/vehicle_command.h>
+#include <systemlib/systemlib.h>
+
static bool thread_should_exit = false; /**< Deamon exit flag */
static bool thread_running = false; /**< Deamon status flag */
static int deamon_task; /**< Handle of deamon task / thread */
@@ -120,7 +122,12 @@ int sdlog_main(int argc, char *argv[])
}
thread_should_exit = false;
- deamon_task = task_create("sdlog", SCHED_PRIORITY_DEFAULT - 30, 4096, sdlog_thread_main, (argv) ? (const char **)&argv[2] : (const char **)NULL);
+ deamon_task = task_spawn("sdlog",
+ SCHED_RR,
+ SCHED_PRIORITY_DEFAULT - 30,
+ 4096,
+ sdlog_thread_main,
+ (argv) ? (const char **)&argv[2] : (const char **)NULL);
thread_running = true;
exit(0);
}