Don't call usleep if signals are disabled

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@278 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2007-06-09 20:39:21 +00:00
parent bece513004
commit 7ac971d7ee
3 changed files with 8 additions and 0 deletions

View File

@ -174,5 +174,7 @@
* include/nuttx/compiler.h: Fix for using SDCC with the Z80. * include/nuttx/compiler.h: Fix for using SDCC with the Z80.
* include/assert.h & arch/pjrc-8051/src/up_assert.c: SDCC does support * include/assert.h & arch/pjrc-8051/src/up_assert.c: SDCC does support
__FILE__and __LINE__ (not tested) __FILE__and __LINE__ (not tested)
* examples/ostest/barrier.c: Don't call usleep() when signals are
disabled.
* Started m68322 * Started m68322

View File

@ -608,6 +608,8 @@ Other memory:
* include/nuttx/compiler.h: Fix for using SDCC with the Z80. * include/nuttx/compiler.h: Fix for using SDCC with the Z80.
* include/assert.h & arch/pjrc-8051/src/up_assert.c: SDCC does support * include/assert.h & arch/pjrc-8051/src/up_assert.c: SDCC does support
__FILE__and __LINE__ (not tested) __FILE__and __LINE__ (not tested)
* examples/ostest/barrier.c: Don't call usleep() when signals are
disabled.
* Started m68322 * Started m68322
</pre></ul> </pre></ul>

View File

@ -49,7 +49,9 @@ static void *barrier_func(void *parameter)
int status; int status;
printf("barrier_func: Thread %d started\n", id); printf("barrier_func: Thread %d started\n", id);
#ifndef CONFIG_DISABLE_SIGNALS
usleep(500*1000); usleep(500*1000);
#endif
/* Take the semaphore */ /* Take the semaphore */
@ -68,7 +70,9 @@ static void *barrier_func(void *parameter)
printf("barrier_func: ERROR thread %d could not get semaphore value\n", id); printf("barrier_func: ERROR thread %d could not get semaphore value\n", id);
} }
#ifndef CONFIG_DISABLE_SIGNALS
usleep(500*1000); usleep(500*1000);
#endif
printf("barrier_func: Thread %d done\n", id); printf("barrier_func: Thread %d done\n", id);
return NULL; return NULL;
} }