summaryrefslogtreecommitdiff
path: root/nuttx/examples/ostest/timedmqueue.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-12-30 23:34:20 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-12-30 23:34:20 +0000
commitcec4c4d2c9468a0d0234d306c886ba97515b1690 (patch)
tree326bbe7079e54314b42270d115ae6d39e8f037b8 /nuttx/examples/ostest/timedmqueue.c
parentf3532ac59f8b6bb4d4a7239b73b5fcb4b66ed6b1 (diff)
downloadpx4-nuttx-cec4c4d2c9468a0d0234d306c886ba97515b1690.tar.gz
px4-nuttx-cec4c4d2c9468a0d0234d306c886ba97515b1690.tar.bz2
px4-nuttx-cec4c4d2c9468a0d0234d306c886ba97515b1690.zip
More SDCC compilation fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@468 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/examples/ostest/timedmqueue.c')
-rw-r--r--nuttx/examples/ostest/timedmqueue.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/nuttx/examples/ostest/timedmqueue.c b/nuttx/examples/ostest/timedmqueue.c
index 186296a06..2ef0dedea 100644
--- a/nuttx/examples/ostest/timedmqueue.c
+++ b/nuttx/examples/ostest/timedmqueue.c
@@ -66,6 +66,12 @@
#define TEST_SEND_NMSGS (10)
#define TEST_RECEIVE_NMSGS (10)
+#if CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0
+# define FFLUSH() fflush(stdout)
+#else
+# define FFLUSH()
+#endif
+
/**************************************************************************
* Private Types
**************************************************************************/
@@ -180,7 +186,7 @@ static void *sender_thread(void *arg)
}
printf("sender_thread: returning nerrors=%d\n", nerrors);
- fflush(stdout);
+ FFLUSH();
return (pthread_addr_t)nerrors;
}
@@ -305,7 +311,7 @@ static void *receiver_thread(void *arg)
}
printf("receiver_thread: returning nerrors=%d\n", nerrors);
- fflush(stdout);
+ FFLUSH();
pthread_exit((pthread_addr_t)nerrors);
return (pthread_addr_t)nerrors;
}