summaryrefslogtreecommitdiff
path: root/nuttx/examples/nxflat/tests/mutex/mutex.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-06-26 13:43:32 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-06-26 13:43:32 +0000
commit90c3c302a9106d87793af0c02b7626e1df8db157 (patch)
tree42475b6f39c85b2b1ad062bdba00d0614f99b818 /nuttx/examples/nxflat/tests/mutex/mutex.c
parented56837c5f266ade308f4306ffeb81a0d5eb05e0 (diff)
downloadpx4-nuttx-90c3c302a9106d87793af0c02b7626e1df8db157.tar.gz
px4-nuttx-90c3c302a9106d87793af0c02b7626e1df8db157.tar.bz2
px4-nuttx-90c3c302a9106d87793af0c02b7626e1df8db157.zip
function pointers in modules must have global scope
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1960 42af7a65-404d-4744-a932-0658087f49c3
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;