git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@843 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
0873929b10
commit
b4357c2bf7
|
@ -27,10 +27,9 @@
|
||||||
|
|
||||||
static Semaphore sem1;
|
static Semaphore sem1;
|
||||||
|
|
||||||
#if !CH_USE_SEMAPHORES_PRIORITY
|
|
||||||
static char *sem1_gettest(void) {
|
static char *sem1_gettest(void) {
|
||||||
|
|
||||||
return "Semaphores, FIFO enqueuing test";
|
return "Semaphores, enqueuing test";
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sem1_setup(void) {
|
static void sem1_setup(void) {
|
||||||
|
@ -58,7 +57,11 @@ static void sem1_execute(void) {
|
||||||
chSemSignal(&sem1);
|
chSemSignal(&sem1);
|
||||||
chSemSignal(&sem1);
|
chSemSignal(&sem1);
|
||||||
test_wait_threads();
|
test_wait_threads();
|
||||||
|
#if CH_USE_SEMAPHORES_PRIORITY
|
||||||
|
test_assert_sequence("ADCEB");
|
||||||
|
#else
|
||||||
test_assert_sequence("ABCDE");
|
test_assert_sequence("ABCDE");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct testcase testsem1 = {
|
const struct testcase testsem1 = {
|
||||||
|
@ -67,7 +70,6 @@ const struct testcase testsem1 = {
|
||||||
NULL,
|
NULL,
|
||||||
sem1_execute
|
sem1_execute
|
||||||
};
|
};
|
||||||
#endif /* CH_USE_SEMAPHORES_PRIORITY */
|
|
||||||
|
|
||||||
#if CH_USE_SEMAPHORES_TIMEOUT
|
#if CH_USE_SEMAPHORES_TIMEOUT
|
||||||
static char *sem2_gettest(void) {
|
static char *sem2_gettest(void) {
|
||||||
|
@ -114,9 +116,7 @@ const struct testcase testsem2 = {
|
||||||
*/
|
*/
|
||||||
const struct testcase * const patternsem[] = {
|
const struct testcase * const patternsem[] = {
|
||||||
#if CH_USE_SEMAPHORES
|
#if CH_USE_SEMAPHORES
|
||||||
#if !CH_USE_SEMAPHORES_PRIORITY
|
|
||||||
&testsem1,
|
&testsem1,
|
||||||
#endif
|
|
||||||
#if CH_USE_SEMAPHORES_TIMEOUT
|
#if CH_USE_SEMAPHORES_TIMEOUT
|
||||||
&testsem2,
|
&testsem2,
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue