aboutsummaryrefslogtreecommitdiffstats
path: root/test/testsem.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-08-16 17:41:56 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-08-16 17:41:56 +0000
commitbfa3ba9f00d263a15d6d6b2dec2aa0b81058df27 (patch)
tree817fc88a260e36d897b48dce522f2057b15346e0 /test/testsem.c
parent752b44ba0e550159fb6d2372c54a278fb94080eb (diff)
downloadChibiOS-bfa3ba9f00d263a15d6d6b2dec2aa0b81058df27.tar.gz
ChibiOS-bfa3ba9f00d263a15d6d6b2dec2aa0b81058df27.tar.bz2
ChibiOS-bfa3ba9f00d263a15d6d6b2dec2aa0b81058df27.zip
Turned more macros in inline functions.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6166 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'test/testsem.c')
-rw-r--r--test/testsem.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/testsem.c b/test/testsem.c
index 0810300ea..0d74f3613 100644
--- a/test/testsem.c
+++ b/test/testsem.c
@@ -83,11 +83,11 @@ static msg_t thread1(void *p) {
static void sem1_execute(void) {
- threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriority()+5, thread1, "A");
- threads[1] = chThdCreateStatic(wa[1], WA_SIZE, chThdGetPriority()+1, thread1, "B");
- threads[2] = chThdCreateStatic(wa[2], WA_SIZE, chThdGetPriority()+3, thread1, "C");
- threads[3] = chThdCreateStatic(wa[3], WA_SIZE, chThdGetPriority()+4, thread1, "D");
- threads[4] = chThdCreateStatic(wa[4], WA_SIZE, chThdGetPriority()+2, thread1, "E");
+ threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriorityX()+5, thread1, "A");
+ threads[1] = chThdCreateStatic(wa[1], WA_SIZE, chThdGetPriorityX()+1, thread1, "B");
+ threads[2] = chThdCreateStatic(wa[2], WA_SIZE, chThdGetPriorityX()+3, thread1, "C");
+ threads[3] = chThdCreateStatic(wa[3], WA_SIZE, chThdGetPriorityX()+4, thread1, "D");
+ threads[4] = chThdCreateStatic(wa[4], WA_SIZE, chThdGetPriorityX()+2, thread1, "E");
chSemSignal(&sem1);
chSemSignal(&sem1);
chSemSignal(&sem1);
@@ -99,7 +99,7 @@ static void sem1_execute(void) {
#else
test_assert_sequence(1, "ABCDE");
#endif
- threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriority()+5, thread1, "A");
+ threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriorityX()+5, thread1, "A");
chSysLock();
chSemAddCounterI(&sem1, 2);
chSysUnlock();
@@ -157,7 +157,7 @@ static void sem2_execute(void) {
/*
* Testing not timeout condition.
*/
- threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriority() - 1,
+ threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriorityX() - 1,
thread2, 0);
msg = chSemWaitTimeout(&sem1, MS2ST(500));
test_wait_threads();
@@ -215,7 +215,7 @@ static msg_t thread3(void *p) {
static void sem3_execute(void) {
- threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriority()+1, thread3, 0);
+ threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriorityX()+1, thread3, 0);
chSemSignalWait(&sem1, &sem1);
test_assert(1, queue_isempty(&sem1.s_queue), "queue not empty");
test_assert(2, sem1.s_cnt == 0, "counter not zero");
@@ -256,7 +256,7 @@ static void sem4_execute(void) {
/* Starts a signaler thread at a lower priority.*/
threads[0] = chThdCreateStatic(wa[0], WA_SIZE,
- chThdGetPriority()-1, thread4, &bsem);
+ chThdGetPriorityX()-1, thread4, &bsem);
/* Waits to be signaled.*/
chBSemWait(&bsem);