From e77a8b7a9a521807440bfda0abb73b96393c67cc Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 22 Mar 2007 16:06:35 +0000 Subject: [PATCH] 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 --- examples/ostest/roundrobin.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/examples/ostest/roundrobin.c b/examples/ostest/roundrobin.c index 7adb7251218..88b16932342 100644 --- a/examples/ostest/roundrobin.c +++ b/examples/ostest/roundrobin.c @@ -1,5 +1,5 @@ /******************************************************************************** - * dev_null.c + * roundrobin.c * * Copyright (C) 2007 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -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);