aboutsummaryrefslogtreecommitdiffstats
path: root/test/testsem.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-06-15 11:34:16 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-06-15 11:34:16 +0000
commita544f87a38e6f0b4b60113dbec8352d5f6c04104 (patch)
treeeb09ecf7b7ed53ce3ec47a7be96d3307f3e2732c /test/testsem.c
parenteee0672c0a2da8eae066ca32ac19fa6f974876bb (diff)
downloadChibiOS-a544f87a38e6f0b4b60113dbec8352d5f6c04104.tar.gz
ChibiOS-a544f87a38e6f0b4b60113dbec8352d5f6c04104.tar.bz2
ChibiOS-a544f87a38e6f0b4b60113dbec8352d5f6c04104.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2020 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'test/testsem.c')
-rw-r--r--test/testsem.c31
1 files changed, 9 insertions, 22 deletions
diff --git a/test/testsem.c b/test/testsem.c
index dd9db66cd..58d4e5e35 100644
--- a/test/testsem.c
+++ b/test/testsem.c
@@ -70,10 +70,6 @@ static SEMAPHORE_DECL(sem1, 0);
* priority order depending on the CH_USE_SEMAPHORES_PRIORITY configuration
* setting.
*/
-static char *sem1_gettest(void) {
-
- return "Semaphores, enqueuing";
-}
static void sem1_setup(void) {
@@ -107,6 +103,13 @@ static void sem1_execute(void) {
#endif
}
+const struct testcase testsem1 = {
+ "Semaphores, enqueuing",
+ sem1_setup,
+ NULL,
+ sem1_execute
+};
+
/**
* @page test_sem_002 Timeout test
*
@@ -117,17 +120,6 @@ static void sem1_execute(void) {
* in each of the above scenario and that the semaphore structure status is
* correct after each operation.
*/
-const struct testcase testsem1 = {
- sem1_gettest,
- sem1_setup,
- NULL,
- sem1_execute
-};
-
-static char *sem2_gettest(void) {
-
- return "Semaphores, timeout";
-}
static void sem2_setup(void) {
@@ -186,7 +178,7 @@ static void sem2_execute(void) {
}
const struct testcase testsem2 = {
- sem2_gettest,
+ "Semaphores, timeout",
sem2_setup,
NULL,
sem2_execute
@@ -205,11 +197,6 @@ const struct testcase testsem2 = {
* correct after each operation.
*/
-static char *sem3_gettest(void) {
-
- return "Semaphores, atomic signal-wait";
-}
-
static void sem3_setup(void) {
chSemInit(&sem1, 0);
@@ -236,7 +223,7 @@ static void sem3_execute(void) {
}
const struct testcase testsem3 = {
- sem3_gettest,
+ "Semaphores, atomic signal-wait",
sem3_setup,
NULL,
sem3_execute