9
0
Fork 0

Don't call fflush if streams are disabled

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@272 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2007-06-07 00:29:46 +00:00
parent ef803e1805
commit 3828f19567
1 changed files with 14 additions and 0 deletions

View File

@ -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
}