summaryrefslogtreecommitdiff
path: root/nuttx/examples/nxflat/tests/task/task.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/examples/nxflat/tests/task/task.c')
-rw-r--r--nuttx/examples/nxflat/tests/task/task.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/nuttx/examples/nxflat/tests/task/task.c b/nuttx/examples/nxflat/tests/task/task.c
index 039dff953..6083d68bd 100644
--- a/nuttx/examples/nxflat/tests/task/task.c
+++ b/nuttx/examples/nxflat/tests/task/task.c
@@ -58,7 +58,12 @@ static sem_t g_sem;
* Privite Functions
****************************************************************************/
-int child_task(int argc, char **argv)
+/* NOTE: it is necessary for functions that are referred to by function pointers
+ * pointer to be declared with global scope (at least for ARM). Otherwise,
+ * a relocation type that is not supported by NXFLAT is generated by GCC.
+ */
+
+ int child_task(int argc, char **argv)
{
printf("Child: execv was successful!\n");
printf("Child: argc=%d\n", argc);