summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-03-22 16:06:35 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-03-22 16:06:35 +0000
commitc0a2a78525cfafb173d9389ff5da00de5cf35870 (patch)
treebc81e18d7a812dc758eae99ae56bb05c69696715
parent9de734f2b4321570ac13051c26f1120a79b17849 (diff)
downloadnuttx-c0a2a78525cfafb173d9389ff5da00de5cf35870.tar.gz
nuttx-c0a2a78525cfafb173d9389ff5da00de5cf35870.tar.bz2
nuttx-c0a2a78525cfafb173d9389ff5da00de5cf35870.zip
Simultaneous flushing stdout from several threads corrects the output. That is a bug, this is a bandaid for now.
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@118 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r--nuttx/examples/ostest/roundrobin.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/nuttx/examples/ostest/roundrobin.c b/nuttx/examples/ostest/roundrobin.c
index 7adb72512..88b169323 100644
--- a/nuttx/examples/ostest/roundrobin.c
+++ b/nuttx/examples/ostest/roundrobin.c
@@ -1,5 +1,5 @@
/********************************************************************************
- * dev_null.c
+ * roundrobin.c
*
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -125,7 +125,6 @@ static void *sieve1(void *parameter)
int i;
printf("sieve1 started\n");
- fflush(stdout);
for (i = 0; i < 1000; i++)
{
@@ -133,7 +132,6 @@ static void *sieve1(void *parameter)
}
printf("sieve1 finished\n");
- fflush(stdout);
pthread_exit(NULL);
}
@@ -147,7 +145,6 @@ static void *sieve2(void *parameter)
int i;
printf("sieve2 started\n");
- fflush(stdout);
for (i = 0; i < 1000; i++)
{
@@ -155,7 +152,6 @@ static void *sieve2(void *parameter)
}
printf("sieve2 finished\n");
- fflush(stdout);
pthread_exit(NULL);
}
@@ -222,7 +218,6 @@ void rr_test(void)
printf("rr_test: Waiting for sieves to complete -- this should take awhile\n");
printf("rr_test: If RR scheduling is working, they should start and complete at\n");
printf("rr_test: about the same time\n");
- fflush(stdout);
pthread_join(sieve2_thread, &result);
pthread_join(sieve1_thread, &result);