aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-09-18 06:48:56 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-09-18 06:48:56 +0000
commit9ffea7e261ec4016d788abbbf7c4a6d3a78e0a04 (patch)
treee1a78e689da1385b7d47fa0c96f7f45f0948951e /test
parentfb439b48b91534c3dd00f204b5023d0528d93ad8 (diff)
downloadChibiOS-9ffea7e261ec4016d788abbbf7c4a6d3a78e0a04.tar.gz
ChibiOS-9ffea7e261ec4016d788abbbf7c4a6d3a78e0a04.tar.bz2
ChibiOS-9ffea7e261ec4016d788abbbf7c4a6d3a78e0a04.zip
Documentation improvements, renamed some event APIs.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2179 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'test')
-rw-r--r--test/testevt.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/testevt.c b/test/testevt.c
index 677e06d44..079257ac5 100644
--- a/test/testevt.c
+++ b/test/testevt.c
@@ -77,7 +77,7 @@ static EVENTSOURCE_DECL(es2);
static void evt1_setup(void) {
- chEvtClear(ALL_EVENTS);
+ chEvtClearFlags(ALL_EVENTS);
}
static void h1(eventid_t id) {(void)id;test_emit_token('A');}
@@ -130,7 +130,7 @@ ROMCONST struct testcase testevt1 = {
static void evt2_setup(void) {
- chEvtClear(ALL_EVENTS);
+ chEvtClearFlags(ALL_EVENTS);
}
static msg_t thread1(void *p) {
@@ -157,12 +157,12 @@ static void evt2_execute(void) {
/*
* Test on chEvtWaitOne() without wait.
*/
- chEvtPend(5);
+ chEvtAddFlags(5);
m = chEvtWaitOne(ALL_EVENTS);
test_assert(1, m == 1, "single event error");
m = chEvtWaitOne(ALL_EVENTS);
test_assert(2, m == 4, "single event error");
- m = chEvtClear(ALL_EVENTS);
+ m = chEvtClearFlags(ALL_EVENTS);
test_assert(3, m == 0, "stuck event");
/*
@@ -175,17 +175,17 @@ static void evt2_execute(void) {
m = chEvtWaitOne(ALL_EVENTS);
test_assert_time_window(4, target_time, target_time + ALLOWED_DELAY);
test_assert(5, m == 1, "single event error");
- m = chEvtClear(ALL_EVENTS);
+ m = chEvtClearFlags(ALL_EVENTS);
test_assert(6, m == 0, "stuck event");
test_wait_threads();
/*
* Test on chEvtWaitAny() without wait.
*/
- chEvtPend(5);
+ chEvtAddFlags(5);
m = chEvtWaitAny(ALL_EVENTS);
test_assert(7, m == 5, "unexpected pending bit");
- m = chEvtClear(ALL_EVENTS);
+ m = chEvtClearFlags(ALL_EVENTS);
test_assert(8, m == 0, "stuck event");
/*
@@ -198,7 +198,7 @@ static void evt2_execute(void) {
m = chEvtWaitAny(ALL_EVENTS);
test_assert_time_window(9, target_time, target_time + ALLOWED_DELAY);
test_assert(10, m == 1, "single event error");
- m = chEvtClear(ALL_EVENTS);
+ m = chEvtClearFlags(ALL_EVENTS);
test_assert(11, m == 0, "stuck event");
test_wait_threads();
@@ -215,7 +215,7 @@ static void evt2_execute(void) {
thread2, "A");
m = chEvtWaitAll(5);
test_assert_time_window(12, target_time, target_time + ALLOWED_DELAY);
- m = chEvtClear(ALL_EVENTS);
+ m = chEvtClearFlags(ALL_EVENTS);
test_assert(13, m == 0, "stuck event");
test_wait_threads();
chEvtUnregister(&es1, &el1);
@@ -249,7 +249,7 @@ ROMCONST struct testcase testevt2 = {
static void evt3_setup(void) {
- chEvtClear(ALL_EVENTS);
+ chEvtClearFlags(ALL_EVENTS);
}
static void evt3_execute(void) {