aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-11-09 13:36:46 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-11-09 13:36:46 +0000
commit5c0a95bd3ba12bd0b334c84350ad66ff21124a6c (patch)
treec94eb54708ac8f5487a9165056245a5c1ed74ba1
parenta016a7cce0c1869a62cc70ea8e4569be726304ed (diff)
downloadChibiOS-5c0a95bd3ba12bd0b334c84350ad66ff21124a6c.tar.gz
ChibiOS-5c0a95bd3ba12bd0b334c84350ad66ff21124a6c.tar.bz2
ChibiOS-5c0a95bd3ba12bd0b334c84350ad66ff21124a6c.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7499 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--doc/reports/rt_test_build.txt81
-rw-r--r--os/rt/src/chthreads.c2
-rw-r--r--test/rt/testbmk.c32
3 files changed, 100 insertions, 15 deletions
diff --git a/doc/reports/rt_test_build.txt b/doc/reports/rt_test_build.txt
new file mode 100644
index 000000000..8e5cc5b88
--- /dev/null
+++ b/doc/reports/rt_test_build.txt
@@ -0,0 +1,81 @@
+Default maximum settings
+ * Building...OK
+ * Testing...OK
+CH_CFG_OPTIMIZE_SPEED=FALSE
+ * Building...OK
+ * Testing...OK
+CH_CFG_TIME_QUANTUM=0
+ * Building...OK
+ * Testing...OK
+CH_CFG_USE_REGISTRY=FALSE
+ * Building...OK
+ * Testing...OK
+CH_CFG_USE_SEMAPHORES=FALSE CH_CFG_USE_MAILBOXES=FALSE
+ * Building...OK
+ * Testing...OK
+CH_CFG_USE_SEMAPHORES_PRIORITY=TRUE
+ * Building...OK
+ * Testing...OK
+CH_CFG_USE_MUTEXES=FALSE CH_CFG_USE_CONDVARS=FALSE
+ * Building...OK
+ * Testing...OK
+CH_CFG_USE_MUTEXES_RECURSIVE=TRUE
+ * Building...OK
+ * Testing...OK
+CH_CFG_USE_CONDVARS=FALSE
+ * Building...OK
+ * Testing...OK
+CH_CFG_USE_CONDVARS_TIMEOUT=FALSE
+ * Building...OK
+ * Testing...OK
+CH_CFG_USE_EVENTS=FALSE
+ * Building...OK
+ * Testing...OK
+CH_CFG_USE_EVENTS_TIMEOUT=FALSE
+ * Building...OK
+ * Testing...OK
+CH_CFG_USE_MESSAGES=FALSE
+ * Building...OK
+ * Testing...OK
+CH_CFG_USE_MESSAGES_PRIORITY=TRUE
+ * Building...OK
+ * Testing...OK
+CH_CFG_USE_MAILBOXES=FALSE
+ * Building...OK
+ * Testing...OK
+CH_CFG_USE_MEMCORE=FALSE CH_CFG_USE_MEMPOOLS=FALSE CH_CFG_USE_HEAP=FALSE CH_CFG_USE_DYNAMIC=FALSE
+ * Building...OK
+ * Testing...OK
+CH_CFG_USE_MEMPOOLS=FALSE CH_CFG_USE_HEAP=FALSE CH_CFG_USE_DYNAMIC=FALSE
+ * Building...OK
+ * Testing...OK
+CH_CFG_USE_MEMPOOLS=FALSE
+ * Building...OK
+ * Testing...OK
+CH_CFG_USE_HEAP=FALSE
+ * Building...OK
+ * Testing...OK
+CH_CFG_USE_DYNAMIC=FALSE
+ * Building...OK
+ * Testing...OK
+CH_DBG_SYSTEM_STATE_CHECK=TRUE
+ * Building...OK
+ * Testing...OK
+CH_DBG_ENABLE_CHECKS=TRUE
+ * Building...OK
+ * Testing...OK
+CH_DBG_ENABLE_ASSERTS=TRUE
+ * Building...OK
+ * Testing...OK
+CH_DBG_ENABLE_TRACE=TRUE
+ * Building...OK
+ * Testing...OK
+CH_DBG_FILL_THREADS=TRUE
+ * Building...OK
+ * Testing...OK
+CH_DBG_THREADS_PROFILING=FALSE
+ * Building...OK
+ * Testing...OK
+CH_DBG_SYSTEM_STATE_CHECK=TRUE CH_DBG_ENABLE_CHECKS=TRUE CH_DBG_ENABLE_ASSERTS=TRUE CH_DBG_ENABLE_TRACE=TRUE CH_DBG_FILL_THREADS=TRUE
+ * Building...OK
+ * Testing...OK
diff --git a/os/rt/src/chthreads.c b/os/rt/src/chthreads.c
index 3cff4dc61..61b0755f2 100644
--- a/os/rt/src/chthreads.c
+++ b/os/rt/src/chthreads.c
@@ -498,7 +498,7 @@ msg_t chThdSuspendS(thread_reference_t *trp) {
*trp = tp;
tp->p_u.wtobjp = &trp;
chSchGoSleepS(CH_STATE_SUSPENDED);
- return chThdGetSelfX()->p_msg;
+ return chThdGetSelfX()->p_u.rdymsg;
}
/**
diff --git a/test/rt/testbmk.c b/test/rt/testbmk.c
index 42ae0f063..461dbc76b 100644
--- a/test/rt/testbmk.c
+++ b/test/rt/testbmk.c
@@ -64,6 +64,12 @@ static mutex_t mtx1;
#endif
static msg_t thread1(void *p) {
+
+ return (msg_t)p;
+}
+
+#if CH_CFG_USE_MESSAGES || defined(__DOXYGEN__)
+static msg_t thread2(void *p) {
thread_t *tp;
msg_t msg;
@@ -107,7 +113,7 @@ static unsigned int msg_loop_test(thread_t *tp) {
static void bmk1_execute(void) {
uint32_t n;
- threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriorityX()-1, thread1, NULL);
+ threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriorityX()-1, thread2, NULL);
n = msg_loop_test(threads[0]);
test_wait_threads();
test_print("--- Score : ");
@@ -136,7 +142,7 @@ ROMCONST struct testcase testbmk1 = {
static void bmk2_execute(void) {
uint32_t n;
- threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriorityX()+1, thread1, NULL);
+ threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriorityX()+1, thread2, NULL);
n = msg_loop_test(threads[0]);
test_wait_threads();
test_print("--- Score : ");
@@ -153,11 +159,6 @@ ROMCONST struct testcase testbmk2 = {
bmk2_execute
};
-static msg_t thread2(void *p) {
-
- return (msg_t)p;
-}
-
/**
* @page test_benchmarks_003 Messages performance #3
*
@@ -171,11 +172,11 @@ static msg_t thread2(void *p) {
static void bmk3_execute(void) {
uint32_t n;
- threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriorityX()+1, thread1, NULL);
- threads[1] = chThdCreateStatic(wa[1], WA_SIZE, chThdGetPriorityX()-2, thread2, NULL);
- threads[2] = chThdCreateStatic(wa[2], WA_SIZE, chThdGetPriorityX()-3, thread2, NULL);
- threads[3] = chThdCreateStatic(wa[3], WA_SIZE, chThdGetPriorityX()-4, thread2, NULL);
- threads[4] = chThdCreateStatic(wa[4], WA_SIZE, chThdGetPriorityX()-5, thread2, NULL);
+ threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriorityX()+1, thread2, NULL);
+ threads[1] = chThdCreateStatic(wa[1], WA_SIZE, chThdGetPriorityX()-2, thread1, NULL);
+ threads[2] = chThdCreateStatic(wa[2], WA_SIZE, chThdGetPriorityX()-3, thread1, NULL);
+ threads[3] = chThdCreateStatic(wa[3], WA_SIZE, chThdGetPriorityX()-4, thread1, NULL);
+ threads[4] = chThdCreateStatic(wa[4], WA_SIZE, chThdGetPriorityX()-5, thread1, NULL);
n = msg_loop_test(threads[0]);
test_wait_threads();
test_print("--- Score : ");
@@ -191,6 +192,7 @@ ROMCONST struct testcase testbmk3 = {
NULL,
bmk3_execute
};
+#endif /* if CH_CFG_USE_MESSAGES */
/**
* @page test_benchmarks_004 Context Switch performance
@@ -273,7 +275,7 @@ static void bmk5_execute(void) {
test_wait_tick();
test_start_timer(1000);
do {
- chThdWait(chThdCreateStatic(wap, WA_SIZE, prio, thread2, NULL));
+ chThdWait(chThdCreateStatic(wap, WA_SIZE, prio, thread1, NULL));
n++;
#if defined(SIMULATOR)
_sim_check_for_interrupts();
@@ -312,7 +314,7 @@ static void bmk6_execute(void) {
test_wait_tick();
test_start_timer(1000);
do {
- chThdCreateStatic(wap, WA_SIZE, prio, thread2, NULL);
+ chThdCreateStatic(wap, WA_SIZE, prio, thread1, NULL);
n++;
#if defined(SIMULATOR)
_sim_check_for_interrupts();
@@ -701,9 +703,11 @@ ROMCONST struct testcase testbmk13 = {
*/
ROMCONST struct testcase * ROMCONST patternbmk[] = {
#if !TEST_NO_BENCHMARKS
+#if CH_CFG_USE_MESSAGES || defined(__DOXYGEN__)
&testbmk1,
&testbmk2,
&testbmk3,
+#endif
&testbmk4,
&testbmk5,
&testbmk6,