Few fixes to the new code after the batch build test.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1592 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
gdisirio 2010-02-12 18:51:48 +00:00
parent 50254892c5
commit 4d832fdf1c
6 changed files with 100 additions and 95 deletions

View File

@ -5,7 +5,7 @@ Settings: SYSCLK=72, ACR=0x12 (2 wait states)
*** ChibiOS/RT test suite *** ChibiOS/RT test suite
*** ***
*** Kernel: 1.5.0unstable *** Kernel: 1.5.1unstable
*** Architecture: ARM Cortex-M3 *** Architecture: ARM Cortex-M3
*** GCC Version: 4.4.2 *** GCC Version: 4.4.2
@ -105,11 +105,11 @@ Settings: SYSCLK=72, ACR=0x12 (2 wait states)
--- Result: SUCCESS --- Result: SUCCESS
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
--- Test Case 11.5 (Benchmark, threads, full cycle) --- Test Case 11.5 (Benchmark, threads, full cycle)
--- Score : 173605 threads/S --- Score : 146984 threads/S
--- Result: SUCCESS --- Result: SUCCESS
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
--- Test Case 11.6 (Benchmark, threads, create only) --- Test Case 11.6 (Benchmark, threads, create only)
--- Score : 222517 threads/S --- Score : 203029 threads/S
--- Result: SUCCESS --- Result: SUCCESS
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
--- Test Case 11.7 (Benchmark, mass reschedulation, 5 threads) --- Test Case 11.7 (Benchmark, mass reschedulation, 5 threads)
@ -117,7 +117,7 @@ Settings: SYSCLK=72, ACR=0x12 (2 wait states)
--- Result: SUCCESS --- Result: SUCCESS
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
--- Test Case 11.8 (Benchmark, round robin context switching) --- Test Case 11.8 (Benchmark, round robin context switching)
--- Score : 505284 reschedulations/S, 505284 ctxswc/S --- Score : 505288 reschedulations/S, 505288 ctxswc/S
--- Result: SUCCESS --- Result: SUCCESS
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
--- Test Case 11.9 (Benchmark, I/O Queues throughput) --- Test Case 11.9 (Benchmark, I/O Queues throughput)
@ -137,8 +137,8 @@ Settings: SYSCLK=72, ACR=0x12 (2 wait states)
--- Result: SUCCESS --- Result: SUCCESS
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
--- Test Case 11.13 (Benchmark, RAM footprint) --- Test Case 11.13 (Benchmark, RAM footprint)
--- System: 300 bytes --- System: 332 bytes
--- Thread: 60 bytes --- Thread: 68 bytes
--- Timer : 20 bytes --- Timer : 20 bytes
--- Semaph: 12 bytes --- Semaph: 12 bytes
--- EventS: 4 bytes --- EventS: 4 bytes

View File

@ -2,131 +2,131 @@ Platform : ARM Cortex-M3
OS Setup : Full kernel OS Setup : Full kernel
Compiler : arm-elf-gcc (GCC) 4.4.2 Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -O2 -mthumb Options : -O2 -mthumb
Kernel Size = 5236 Kernel Size = 5428
Platform : ARM Cortex-M3 Platform : ARM Cortex-M3
OS Setup : Minimal kernel OS Setup : Minimal kernel
Compiler : arm-elf-gcc (GCC) 4.4.2 Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -O2 -mthumb Options : -O2 -mthumb
Kernel Size = 1332 Kernel Size = 1468
Platform : ARM Cortex-M3 Platform : ARM Cortex-M3
OS Setup : Full kernel OS Setup : Full kernel
Compiler : arm-elf-gcc (GCC) 4.4.2 Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -Os -mthumb Options : -Os -mthumb
Kernel Size = 5224
Platform : ARM Cortex-M3
OS Setup : Minimal kernel
Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -Os -mthumb
Kernel Size = 1416
Platform : ARM Cortex-M3
OS Setup : Full kernel
Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -Os -mthumb -ffixed-r7 -DCH_CURRP_REGISTER_CACHE=\"r7\"
Kernel Size = 5028
Platform : ARM Cortex-M3
OS Setup : Minimal kernel
Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -Os -mthumb -ffixed-r7 -DCH_CURRP_REGISTER_CACHE=\"r7\"
Kernel Size = 1368
Platform : ARM7TDMI (ARM mode)
OS Setup : Full kernel
Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -O2
Kernel Size = 7964
Platform : ARM7TDMI (ARM mode)
OS Setup : Minimal kernel
Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -O2
Kernel Size = 2160
Platform : ARM7TDMI (ARM mode)
OS Setup : Full kernel
Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -Os
Kernel Size = 7708
Platform : ARM7TDMI (ARM mode)
OS Setup : Minimal kernel
Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -Os
Kernel Size = 2112
Platform : ARM7TDMI (ARM mode)
OS Setup : Full kernel
Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -Os -ffixed-r7 -DCH_CURRP_REGISTER_CACHE=\"r7\"
Kernel Size = 7404
Platform : ARM7TDMI (ARM mode)
OS Setup : Minimal kernel
Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -Os -ffixed-r7 -DCH_CURRP_REGISTER_CACHE=\"r7\"
Kernel Size = 2048
Platform : ARM7TDMI (THUMB mode)
OS Setup : Full kernel
Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -O2 -mthumb -DTHUMB -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING
Kernel Size = 5220
Platform : ARM7TDMI (THUMB mode)
OS Setup : Minimal kernel
Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -O2 -mthumb -DTHUMB -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING
Kernel Size = 1468
Platform : ARM7TDMI (THUMB mode)
OS Setup : Full kernel
Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -Os -mthumb -DTHUMB -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING
Kernel Size = 5044 Kernel Size = 5044
Platform : ARM Cortex-M3
OS Setup : Minimal kernel
Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -Os -mthumb
Kernel Size = 1284
Platform : ARM Cortex-M3
OS Setup : Full kernel
Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -Os -mthumb -ffixed-r7 -DCH_CURRP_REGISTER_CACHE=\"r7\"
Kernel Size = 4844
Platform : ARM Cortex-M3
OS Setup : Minimal kernel
Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -Os -mthumb -ffixed-r7 -DCH_CURRP_REGISTER_CACHE=\"r7\"
Kernel Size = 1236
Platform : ARM7TDMI (ARM mode)
OS Setup : Full kernel
Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -O2
Kernel Size = 7892
Platform : ARM7TDMI (ARM mode)
OS Setup : Minimal kernel
Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -O2
Kernel Size = 1956
Platform : ARM7TDMI (ARM mode)
OS Setup : Full kernel
Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -Os
Kernel Size = 7648
Platform : ARM7TDMI (ARM mode)
OS Setup : Minimal kernel
Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -Os
Kernel Size = 1908
Platform : ARM7TDMI (ARM mode)
OS Setup : Full kernel
Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -Os -ffixed-r7 -DCH_CURRP_REGISTER_CACHE=\"r7\"
Kernel Size = 7344
Platform : ARM7TDMI (ARM mode)
OS Setup : Minimal kernel
Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -Os -ffixed-r7 -DCH_CURRP_REGISTER_CACHE=\"r7\"
Kernel Size = 1844
Platform : ARM7TDMI (THUMB mode)
OS Setup : Full kernel
Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -O2 -mthumb -DTHUMB -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING
Kernel Size = 5140
Platform : ARM7TDMI (THUMB mode)
OS Setup : Minimal kernel
Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -O2 -mthumb -DTHUMB -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING
Kernel Size = 1336
Platform : ARM7TDMI (THUMB mode)
OS Setup : Full kernel
Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -Os -mthumb -DTHUMB -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING
Kernel Size = 4968
Platform : ARM7TDMI (THUMB mode) Platform : ARM7TDMI (THUMB mode)
OS Setup : Minimal kernel OS Setup : Minimal kernel
Compiler : arm-elf-gcc (GCC) 4.4.2 Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -Os -mthumb -DTHUMB -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING Options : -Os -mthumb -DTHUMB -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING
Kernel Size = 1316 Kernel Size = 1448
Platform : ARM7TDMI (THUMB mode) Platform : ARM7TDMI (THUMB mode)
OS Setup : Full kernel OS Setup : Full kernel
Compiler : arm-elf-gcc (GCC) 4.4.2 Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -Os -mthumb -ffixed-r7 -DCH_CURRP_REGISTER_CACHE=\"r7\" -DTHUMB -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING Options : -Os -mthumb -ffixed-r7 -DCH_CURRP_REGISTER_CACHE=\"r7\" -DTHUMB -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING
Kernel Size = 4776 Kernel Size = 4848
Platform : ARM7TDMI (THUMB mode) Platform : ARM7TDMI (THUMB mode)
OS Setup : Minimal kernel OS Setup : Minimal kernel
Compiler : arm-elf-gcc (GCC) 4.4.2 Compiler : arm-elf-gcc (GCC) 4.4.2
Options : -Os -mthumb -ffixed-r7 -DCH_CURRP_REGISTER_CACHE=\"r7\" -DTHUMB -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING Options : -Os -mthumb -ffixed-r7 -DCH_CURRP_REGISTER_CACHE=\"r7\" -DTHUMB -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING
Kernel Size = 1272 Kernel Size = 1404
Platform : MSP430 Platform : MSP430
OS Setup : Full kernel OS Setup : Full kernel
Compiler : msp430-gcc (GCC) 3.2.3 Compiler : msp430-gcc (GCC) 3.2.3
Options : -O2 Options : -O2
Kernel Size = 5456 Kernel Size = 5640
Platform : MSP430 Platform : MSP430
OS Setup : Minimal kernel OS Setup : Minimal kernel
Compiler : msp430-gcc (GCC) 3.2.3 Compiler : msp430-gcc (GCC) 3.2.3
Options : -O2 Options : -O2
Kernel Size = 1160 Kernel Size = 1260
Platform : MSP430 Platform : MSP430
OS Setup : Full kernel OS Setup : Full kernel
Compiler : msp430-gcc (GCC) 3.2.3 Compiler : msp430-gcc (GCC) 3.2.3
Options : -Os Options : -Os
Kernel Size = 5396 Kernel Size = 5576
Platform : MSP430 Platform : MSP430
OS Setup : Minimal kernel OS Setup : Minimal kernel
Compiler : msp430-gcc (GCC) 3.2.3 Compiler : msp430-gcc (GCC) 3.2.3
Options : -Os Options : -Os
Kernel Size = 1160 Kernel Size = 1260

View File

@ -107,8 +107,7 @@ static size_t readt(void *ip, uint8_t *bp, size_t n, systime_t time) {
} }
static const struct BaseChannelVMT vmt = { static const struct BaseChannelVMT vmt = {
{writes, reads}, writes, reads, putwouldblock, getwouldblock, putt, gett, writet, readt
{putwouldblock, getwouldblock, putt, gett, writet, readt}
}; };
/*===========================================================================*/ /*===========================================================================*/

View File

@ -107,8 +107,7 @@ static size_t readt(void *ip, uint8_t *bp, size_t n, systime_t time) {
} }
static const struct BaseChannelVMT vmt = { static const struct BaseChannelVMT vmt = {
{writes, reads}, writes, reads, putwouldblock, getwouldblock, putt, gett, writet, readt
{putwouldblock, getwouldblock, putt, gett, writet, readt}
}; };
/*===========================================================================*/ /*===========================================================================*/

View File

@ -145,9 +145,9 @@ extern "C" {
#endif #endif
#if !CH_OPTIMIZE_SPEED && CH_USE_EVENTS_TIMEOUT #if !CH_OPTIMIZE_SPEED && CH_USE_EVENTS_TIMEOUT
#define chEvtWaitOne(ewmask) chEvtWaitOneTimeout(emask, TIME_INFINITE) #define chEvtWaitOne(mask) chEvtWaitOneTimeout(mask, TIME_INFINITE)
#define chEvtWaitAny(ewmask) chEvtWaitAnyTimeout(emask, TIME_INFINITE) #define chEvtWaitAny(mask) chEvtWaitAnyTimeout(mask, TIME_INFINITE)
#define chEvtWaitAll(ewmask) chEvtWaitAllTimeout(emask, TIME_INFINITE) #define chEvtWaitAll(mask) chEvtWaitAllTimeout(mask, TIME_INFINITE)
#endif #endif
#endif /* CH_USE_EVENTS */ #endif /* CH_USE_EVENTS */

View File

@ -43,7 +43,10 @@ Thread *chRegFirstThread(void) {
Thread *tp; Thread *tp;
chSysLock(); chSysLock();
(tp = rlist.p_newer)->p_refs++; tp = rlist.p_newer;
#if CH_USE_DYNAMIC
tp->p_refs++;
#endif
chSysUnlock(); chSysUnlock();
return tp; return tp;
} }
@ -60,14 +63,18 @@ Thread *chRegFirstThread(void) {
Thread *chRegNextThread(Thread *tp) { Thread *chRegNextThread(Thread *tp) {
chSysLock(); chSysLock();
#if CH_USE_DYNAMIC
chDbgAssert(tp->p_refs > 0, "chRegNextThread(), #1", chDbgAssert(tp->p_refs > 0, "chRegNextThread(), #1",
"not referenced"); "not referenced");
tp->p_refs--; tp->p_refs--;
#endif
if (tp->p_newer != (Thread *)&rlist) { if (tp->p_newer != (Thread *)&rlist) {
tp = tp->p_newer; tp = tp->p_newer;
#if CH_USE_DYNAMIC
chDbgAssert(tp->p_refs < 255, "chRegNextThread(), #2", chDbgAssert(tp->p_refs < 255, "chRegNextThread(), #2",
"too many references"); "too many references");
tp->p_refs++; tp->p_refs++;
#endif
} }
else else
tp = NULL; tp = NULL;