aboutsummaryrefslogtreecommitdiff
path: root/nuttx/binfmt/binfmt_exec.c
diff options
context:
space:
mode:
authorpx4dev <px4@purgatory.org>2013-01-17 01:00:46 -0800
committerpx4dev <px4@purgatory.org>2013-01-17 01:00:46 -0800
commit1a532d16dd3a90f20c3668b00ea4f3a86ea32c49 (patch)
treea770db1fe91e5a3c08e4cb03b216ac36c6f7684d /nuttx/binfmt/binfmt_exec.c
parent7d7c352fb44b718cb96096a624a19b5225e39f92 (diff)
parentcaeef71797019505fd450b1a0ae573ac5e490c6e (diff)
downloadpx4-firmware-1a532d16dd3a90f20c3668b00ea4f3a86ea32c49.tar.gz
px4-firmware-1a532d16dd3a90f20c3668b00ea4f3a86ea32c49.tar.bz2
px4-firmware-1a532d16dd3a90f20c3668b00ea4f3a86ea32c49.zip
Merge NuttX r5527
Diffstat (limited to 'nuttx/binfmt/binfmt_exec.c')
-rw-r--r--nuttx/binfmt/binfmt_exec.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/nuttx/binfmt/binfmt_exec.c b/nuttx/binfmt/binfmt_exec.c
index 60e8d8efd..d878c8cc5 100644
--- a/nuttx/binfmt/binfmt_exec.c
+++ b/nuttx/binfmt/binfmt_exec.c
@@ -1,7 +1,7 @@
/****************************************************************************
* binfmt/binfmt_exec.c
*
- * Copyright (C) 2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2009, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -40,7 +40,6 @@
#include <nuttx/config.h>
#include <string.h>
-#include <sched.h>
#include <debug.h>
#include <errno.h>
@@ -96,6 +95,8 @@ int exec(FAR const char *filename, FAR const char **argv,
struct binary_s bin;
int ret;
+ /* Load the module into memory */
+
memset(&bin, 0, sizeof(struct binary_s));
bin.filename = filename;
bin.exports = exports;
@@ -108,7 +109,9 @@ int exec(FAR const char *filename, FAR const char **argv,
return ERROR;
}
- ret = exec_module(&bin, 50);
+ /* Then start the module */
+
+ ret = exec_module(&bin);
if (ret < 0)
{
bdbg("ERROR: Failed to execute program '%s'\n", filename);