Skip to content
Snippets Groups Projects
Commit 4a4fcb5d authored by Mark Charlebois's avatar Mark Charlebois
Browse files

Linux: fixes for gcc


Fixes to compile with gcc

Signed-off-by: default avatarMark Charlebois <charlebm@gmail.com>
parent 566c3ed3
No related branches found
No related tags found
No related merge requests found
......@@ -37,6 +37,7 @@
* PX4 Middleware Wrapper Linux Implementation
*/
#include <px4_middleware.h>
#include <stdint.h>
#include <stdio.h>
......
......@@ -88,7 +88,7 @@ px4_systemreset(bool to_bootloader)
px4_task_t px4_task_spawn_cmd(const char *name, int scheduler, int priority, int stack_size, px4_main_t entry, char * const argv[])
{
int rv = 0;
int rv;
int argc = 0;
int i;
unsigned int len = 0;
......@@ -128,6 +128,11 @@ px4_task_t px4_task_spawn_cmd(const char *name, int scheduler, int priority, int
//printf("Called px4_task_spawn_cmd\n");
// FIXME - add handling for scheduler and priority
rv = pthread_create (&task, NULL, (void *)&entry_adapter, (void *) taskdata);
if (rv != 0)
{
return (rv < 0) ? rv : -rv;
}
//printf("pthread_create task=%d rv=%d\n",(int)task, rv);
for (i=0; i<PX4_MAX_TASKS; ++i) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment