summaryrefslogtreecommitdiff
path: root/nuttx/examples/nxflat/tests/mutex/mutex.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/examples/nxflat/tests/mutex/mutex.c')
-rw-r--r--nuttx/examples/nxflat/tests/mutex/mutex.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/nuttx/examples/nxflat/tests/mutex/mutex.c b/nuttx/examples/nxflat/tests/mutex/mutex.c
index f161eb7fa..8e528da00 100644
--- a/nuttx/examples/nxflat/tests/mutex/mutex.c
+++ b/nuttx/examples/nxflat/tests/mutex/mutex.c
@@ -54,7 +54,12 @@ static unsigned long nerrors[2] = {0, 0};
* Private Functions
****************************************************************************/
-static void thread_func(void *parameter)
+/* 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.
+ */
+
+void thread_func(void *parameter)
{
int my_id = (int)parameter;
int my_ndx = my_id - 1;