diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-07-20 07:24:12 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-07-20 07:24:12 +0000 |
commit | 390ed322cb8f40cb9250021cde5f48acb928d291 (patch) | |
tree | 1dc550fc749284146c42417ff1d5d40ac1823d5f /test | |
parent | 25ddb1c801f06a3be7171e20dcfd46d11a75f112 (diff) | |
download | ChibiOS-390ed322cb8f40cb9250021cde5f48acb928d291.tar.gz ChibiOS-390ed322cb8f40cb9250021cde5f48acb928d291.tar.bz2 ChibiOS-390ed322cb8f40cb9250021cde5f48acb928d291.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6001 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'test')
-rw-r--r-- | test/testbmk.c | 6 | ||||
-rw-r--r-- | test/testdyn.c | 6 | ||||
-rw-r--r-- | test/testevt.c | 6 | ||||
-rw-r--r-- | test/testheap.c | 2 | ||||
-rw-r--r-- | test/testmbox.c | 2 | ||||
-rw-r--r-- | test/testmtx.c | 28 | ||||
-rw-r--r-- | test/testpools.c | 4 | ||||
-rw-r--r-- | test/testsem.c | 8 |
8 files changed, 31 insertions, 31 deletions
diff --git a/test/testbmk.c b/test/testbmk.c index e117d9120..41d8d457d 100644 --- a/test/testbmk.c +++ b/test/testbmk.c @@ -348,7 +348,7 @@ static msg_t thread3(void *p) { static void bmk7_setup(void) {
- chSemInit(&sem1, 0);
+ chSemObjectInit(&sem1, 0);
}
static void bmk7_execute(void) {
@@ -541,7 +541,7 @@ ROMCONST struct testcase testbmk10 = { static void bmk11_setup(void) {
- chSemInit(&sem1, 1);
+ chSemObjectInit(&sem1, 1);
}
static void bmk11_execute(void) {
@@ -588,7 +588,7 @@ ROMCONST struct testcase testbmk11 = { static void bmk12_setup(void) {
- chMtxInit(&mtx1);
+ chMtxObjectInit(&mtx1);
}
static void bmk12_execute(void) {
diff --git a/test/testdyn.c b/test/testdyn.c index 15664ee07..3f157686d 100644 --- a/test/testdyn.c +++ b/test/testdyn.c @@ -77,7 +77,7 @@ static msg_t thread(void *p) { #if (CH_USE_HEAP && !CH_USE_MALLOC_HEAP) || defined(__DOXYGEN__)
static void dyn1_setup(void) {
- chHeapInit(&heap1, test.buffer, sizeof(union test_buffers));
+ chHeapObjectInit(&heap1, test.buffer, sizeof(union test_buffers));
}
static void dyn1_execute(void) {
@@ -135,7 +135,7 @@ ROMCONST struct testcase testdyn1 = { static void dyn2_setup(void) {
- chPoolInit(&mp1, THD_WA_SIZE(THREADS_STACK_SIZE), NULL);
+ chPoolObjectInit(&mp1, THD_WA_SIZE(THREADS_STACK_SIZE), NULL);
}
static void dyn2_execute(void) {
@@ -202,7 +202,7 @@ static bool_t regfind(thread_t *tp) { static void dyn3_setup(void) {
- chHeapInit(&heap1, test.buffer, sizeof(union test_buffers));
+ chHeapObjectInit(&heap1, test.buffer, sizeof(union test_buffers));
}
static void dyn3_execute(void) {
diff --git a/test/testevt.c b/test/testevt.c index 188a6fe2e..80bc18ae7 100644 --- a/test/testevt.c +++ b/test/testevt.c @@ -88,7 +88,7 @@ static void evt1_execute(void) { /*
* Testing chEvtRegisterMask() and chEvtUnregister().
*/
- chEvtInit(&es1);
+ chEvtObjectInit(&es1);
chEvtRegisterMask(&es1, &el1, 1);
chEvtRegisterMask(&es1, &el2, 2);
test_assert(1, chEvtIsListeningI(&es1), "no listener");
@@ -202,8 +202,8 @@ static void evt2_execute(void) { /*
* Test on chEvtWaitAll().
*/
- chEvtInit(&es1);
- chEvtInit(&es2);
+ chEvtObjectInit(&es1);
+ chEvtObjectInit(&es2);
chEvtRegisterMask(&es1, &el1, 1);
chEvtRegisterMask(&es2, &el2, 4);
test_wait_tick();
diff --git a/test/testheap.c b/test/testheap.c index e160143aa..667b64cb2 100644 --- a/test/testheap.c +++ b/test/testheap.c @@ -63,7 +63,7 @@ static memory_heap_t test_heap; static void heap1_setup(void) {
- chHeapInit(&test_heap, test.buffer, sizeof(union test_buffers));
+ chHeapObjectInit(&test_heap, test.buffer, sizeof(union test_buffers));
}
static void heap1_execute(void) {
diff --git a/test/testmbox.c b/test/testmbox.c index 35a22b88c..c9d554e16 100644 --- a/test/testmbox.c +++ b/test/testmbox.c @@ -70,7 +70,7 @@ static MAILBOX_DECL(mb1, test.wa.T0, MB_SIZE); static void mbox1_setup(void) {
- chMBInit(&mb1, (msg_t *)test.wa.T0, MB_SIZE);
+ chMBObjectInit(&mb1, (msg_t *)test.wa.T0, MB_SIZE);
}
static void mbox1_execute(void) {
diff --git a/test/testmtx.c b/test/testmtx.c index 52b5cebd4..caaf91409 100644 --- a/test/testmtx.c +++ b/test/testmtx.c @@ -83,7 +83,7 @@ static CONDVAR_DECL(c1); static void mtx1_setup(void) {
- chMtxInit(&m1);
+ chMtxObjectInit(&m1);
}
static msg_t thread1(void *p) {
@@ -150,7 +150,7 @@ ROMCONST struct testcase testmtx1 = { static void mtx2_setup(void) {
- chMtxInit(&m1);
+ chMtxObjectInit(&m1);
}
/* Low priority thread */
@@ -240,8 +240,8 @@ ROMCONST struct testcase testmtx2 = { static void mtx3_setup(void) {
- chMtxInit(&m1); /* Mutex B.*/
- chMtxInit(&m2); /* Mutex A.*/
+ chMtxObjectInit(&m1); /* Mutex B.*/
+ chMtxObjectInit(&m2); /* Mutex A.*/
}
/* Lowest priority thread */
@@ -340,8 +340,8 @@ ROMCONST struct testcase testmtx3 = { static void mtx4_setup(void) {
- chMtxInit(&m1);
- chMtxInit(&m2);
+ chMtxObjectInit(&m1);
+ chMtxObjectInit(&m2);
}
static msg_t thread4a(void *p) {
@@ -427,7 +427,7 @@ ROMCONST struct testcase testmtx4 = { static void mtx5_setup(void) {
- chMtxInit(&m1);
+ chMtxObjectInit(&m1);
}
static void mtx5_execute(void) {
@@ -477,8 +477,8 @@ ROMCONST struct testcase testmtx5 = { static void mtx6_setup(void) {
- chCondInit(&c1);
- chMtxInit(&m1);
+ chCondObjectInit(&c1);
+ chMtxObjectInit(&m1);
}
static msg_t thread10(void *p) {
@@ -529,8 +529,8 @@ ROMCONST struct testcase testmtx6 = { static void mtx7_setup(void) {
- chCondInit(&c1);
- chMtxInit(&m1);
+ chCondObjectInit(&c1);
+ chMtxObjectInit(&m1);
}
static void mtx7_execute(void) {
@@ -564,9 +564,9 @@ ROMCONST struct testcase testmtx7 = { static void mtx8_setup(void) {
- chCondInit(&c1);
- chMtxInit(&m1);
- chMtxInit(&m2);
+ chCondObjectInit(&c1);
+ chMtxObjectInit(&m1);
+ chMtxObjectInit(&m2);
}
static msg_t thread11(void *p) {
diff --git a/test/testpools.c b/test/testpools.c index 6515b256f..6ff669227 100644 --- a/test/testpools.c +++ b/test/testpools.c @@ -65,7 +65,7 @@ static void *null_provider(size_t size) { static void pools1_setup(void) {
- chPoolInit(&mp1, THD_WA_SIZE(THREADS_STACK_SIZE), NULL);
+ chPoolObjectInit(&mp1, THD_WA_SIZE(THREADS_STACK_SIZE), NULL);
}
static void pools1_execute(void) {
@@ -93,7 +93,7 @@ static void pools1_execute(void) { test_assert(4, chPoolAlloc(&mp1) == NULL, "list not empty");
/* Covering the case where a provider is unable to return more memory.*/
- chPoolInit(&mp1, 16, null_provider);
+ chPoolObjectInit(&mp1, 16, null_provider);
test_assert(5, chPoolAlloc(&mp1) == NULL, "provider returned memory");
}
diff --git a/test/testsem.c b/test/testsem.c index f4ca03c1a..b27540059 100644 --- a/test/testsem.c +++ b/test/testsem.c @@ -71,7 +71,7 @@ static SEMAPHORE_DECL(sem1, 0); static void sem1_setup(void) {
- chSemInit(&sem1, 0);
+ chSemObjectInit(&sem1, 0);
}
static msg_t thread1(void *p) {
@@ -127,7 +127,7 @@ ROMCONST struct testcase testsem1 = { static void sem2_setup(void) {
- chSemInit(&sem1, 0);
+ chSemObjectInit(&sem1, 0);
}
static msg_t thread2(void *p) {
@@ -203,7 +203,7 @@ ROMCONST struct testcase testsem2 = { static void sem3_setup(void) {
- chSemInit(&sem1, 0);
+ chSemObjectInit(&sem1, 0);
}
static msg_t thread3(void *p) {
@@ -252,7 +252,7 @@ static void sem4_execute(void) { binary_semaphore_t bsem;
/* Creates a taken binary semaphore.*/
- chBSemInit(&bsem, TRUE);
+ chBSemObjectInit(&bsem, TRUE);
chBSemReset(&bsem, TRUE);
test_assert(1, chBSemGetStateI(&bsem) == TRUE, "not taken");
|