git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@329 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2008-07-02 14:01:18 +00:00
parent 5f4dbf9ca9
commit d7443aaab6
3 changed files with 16 additions and 15 deletions

View File

@ -75,8 +75,9 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process,
***************************************************************************** *****************************************************************************
*** 0.6.7 *** *** 0.6.7 ***
- Improvements to the test framework, now a virtual timer is used instead of - OPT: Removed an unrequired initialization from the chThdCreate().
software loops into the bechmarks in order to have more stable results. - OPT: Improvements to the test framework, now a virtual timer is used instead
of software loops into the bechmarks in order to have more stable results.
- Added the C++ wrapper entries to the documentation. - Added the C++ wrapper entries to the documentation.
*** 0.6.6 *** *** 0.6.6 ***
@ -88,8 +89,8 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process,
within the specified time window. within the specified time window.
- FIX: Mutex test #1 in the test suite corrected, it failed to... fail. - FIX: Mutex test #1 in the test suite corrected, it failed to... fail.
- FIX: Fixed a problem in the STM32 port USART1 driver. - FIX: Fixed a problem in the STM32 port USART1 driver.
- FIX: Fixed a problem in the MMC/SD driver in the LPC2148 demo.
- Added the definitions for packed structures to the chtypes.h files. - Added the definitions for packed structures to the chtypes.h files.
- Fixed a problem in the MMC/SD driver in the LPC2148 demo.
- Improvements to the makefiles, now each source group has its own .mk include - Improvements to the makefiles, now each source group has its own .mk include
file. Now it is no more required to rewrite everything in each makefile. file. Now it is no more required to rewrite everything in each makefile.

View File

@ -33,7 +33,6 @@ void init_thread(tprio_t prio, tmode_t mode, Thread *tp) {
tp->p_tid = nextid++; tp->p_tid = nextid++;
tp->p_flags = mode; tp->p_flags = mode;
tp->p_prio = prio; tp->p_prio = prio;
tp->p_rdymsg = RDY_OK;
#ifdef CH_USE_MUTEXES #ifdef CH_USE_MUTEXES
tp->p_mtxlist = NULL; tp->p_mtxlist = NULL;
tp->p_realprio = prio; tp->p_realprio = prio;
@ -48,7 +47,7 @@ void init_thread(tprio_t prio, tmode_t mode, Thread *tp) {
tp->p_epending = 0; tp->p_epending = 0;
#endif #endif
#ifdef CH_USE_EXIT_EVENT #ifdef CH_USE_EXIT_EVENT
chEvtInit(&tp->p_exitesource); chEvtInit(&tp->p_exitesource);
#endif #endif
} }

View File

@ -27,13 +27,13 @@ static unsigned int msg_loop_test(Thread *tp) {
uint32_t n = 0; uint32_t n = 0;
test_wait_tick(); test_wait_tick();
test_start_timer(1000); test_start_timer(1000);
while (!test_timer_done) { do {
(void)chMsgSend(tp, 0); (void)chMsgSend(tp, 0);
n++; n++;
#if defined(WIN32) #if defined(WIN32)
ChkIntSources(); ChkIntSources();
#endif #endif
} } while (!test_timer_done);
return n; return n;
} }
@ -122,7 +122,7 @@ static void bmk3_teardown(void) {
static msg_t thread2(void *p) { static msg_t thread2(void *p) {
return 0; return (msg_t)p;
} }
static void bmk3_execute(void) { static void bmk3_execute(void) {
@ -153,7 +153,7 @@ const struct testcase testbmk3 = {
static char *bmk4_gettest(void) { static char *bmk4_gettest(void) {
return "Benchmark, threads creation/termination"; return "Benchmark, threads creation/termination, worst case";
} }
static void bmk4_setup(void) { static void bmk4_setup(void) {
@ -165,16 +165,17 @@ static void bmk4_teardown(void) {
static void bmk4_execute(void) { static void bmk4_execute(void) {
uint32_t n = 0; uint32_t n = 0;
void *wap = wa[0];
tprio_t prio = chThdGetPriority() - 1;
test_wait_tick(); test_wait_tick();
test_start_timer(1000); test_start_timer(1000);
while (!test_timer_done) { do {
threads[0] = chThdCreate(chThdGetPriority()-1, 0, wa[0], STKSIZE, thread2, NULL); chThdWait(chThdCreate(prio, 0, wap, STKSIZE, thread2, NULL));
chThdWait(threads[0]);
n++; n++;
#if defined(WIN32) #if defined(WIN32)
ChkIntSources(); ChkIntSources();
#endif #endif
} } while (!test_timer_done);
test_print("--- Score : "); test_print("--- Score : ");
test_printn(n); test_printn(n);
test_println(" threads/S"); test_println(" threads/S");
@ -206,7 +207,7 @@ static void bmk5_execute(void) {
uint32_t n = 0; uint32_t n = 0;
test_wait_tick(); test_wait_tick();
test_start_timer(1000); test_start_timer(1000);
while (!test_timer_done) { do {
chIQPutI(&iq, 0); chIQPutI(&iq, 0);
chIQPutI(&iq, 1); chIQPutI(&iq, 1);
chIQPutI(&iq, 2); chIQPutI(&iq, 2);
@ -219,7 +220,7 @@ static void bmk5_execute(void) {
#if defined(WIN32) #if defined(WIN32)
ChkIntSources(); ChkIntSources();
#endif #endif
} } while (!test_timer_done);
test_print("--- Score : "); test_print("--- Score : ");
test_printn(n * 4); test_printn(n * 4);
test_println(" bytes/S"); test_println(" bytes/S");