diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-06-07 00:29:46 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-06-07 00:29:46 +0000 |
commit | 70a8825a7f7328be46027fe26ecf83eb04341c51 (patch) | |
tree | 9223f12955e2f7a159561f740695b10b65f6d09c | |
parent | 63894faf1ee3e490c0cc07ef28c6725edc4c523d (diff) | |
download | nuttx-70a8825a7f7328be46027fe26ecf83eb04341c51.tar.gz nuttx-70a8825a7f7328be46027fe26ecf83eb04341c51.tar.bz2 nuttx-70a8825a7f7328be46027fe26ecf83eb04341c51.zip |
Don't call fflush if streams are disabled
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@272 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r-- | nuttx/examples/ostest/sighand.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/nuttx/examples/ostest/sighand.c b/nuttx/examples/ostest/sighand.c index bc1e5a242..64b550458 100644 --- a/nuttx/examples/ostest/sighand.c +++ b/nuttx/examples/ostest/sighand.c @@ -151,7 +151,11 @@ static int waiter_main(int argc, char *argv[]) /* Take the semaphore */ printf("waiter_main: Waiting on semaphore\n" ); + +#if CONFIG_NFILE_STREAMS > 0 fflush(stdout); +#endif + status = sem_wait(&sem); if (status != 0) { @@ -176,7 +180,11 @@ static int waiter_main(int argc, char *argv[]) status = sigaction(WAKEUP_SIGNAL, &act, &oact); printf("waiter_main: done\n" ); + +#if CONFIG_NFILE_STREAMS > 0 fflush(stdout); +#endif + threadexited = TRUE; return 0; } @@ -222,7 +230,9 @@ void sighand_test(void) /* Wait a bit */ +#if CONFIG_NFILE_STREAMS > 0 fflush(stdout); +#endif sleep(2); /* Then signal the waiter thread. */ @@ -244,7 +254,9 @@ void sighand_test(void) /* Wait a bit */ +#if CONFIG_NFILE_STREAMS > 0 fflush(stdout); +#endif sleep(2); /* Then check the result */ @@ -260,5 +272,7 @@ void sighand_test(void) } printf("sighand_test: done\n" ); +#if CONFIG_NFILE_STREAMS > 0 fflush(stdout); +#endif } |