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

This commit is contained in:
gdisirio 2007-11-29 09:16:53 +00:00
parent 6f0569444d
commit f20b97abe7
2 changed files with 44 additions and 13 deletions

View File

@ -23,17 +23,17 @@
Current ports under ./demos: Current ports under ./demos:
Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process, Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process,
MinGW version. MinGW version.
Win32-MSVS - ChibiOS/RT simulator and demo into a WIN32 process, Win32-MSVS - ChibiOS/RT simulator and demo into a WIN32 process,
Visual Studio 7 or any later version should work. Visual Studio 7 or any later version should work.
ARM7-LPC214x-GCC - ChibiOS/RT port for ARM7 LPC2148, the demo targets the ARM7-LPC214x-GCC - ChibiOS/RT port for ARM7 LPC2148, the demo targets
Olimex LPC-P2148 board. This port can be easily the Olimex LPC-P2148 board. This port can be easily
modified for any processor into the LPC2000 family or modified for any processor into the LPC2000 family or
other boards. The demo can be compiled using YAGARTO other boards. The demo can be compiled using YAGARTO
or any other GCC-based ARM toolchain. Full demo. or any other GCC-based ARM toolchain. Full demo.
ARM7-LPC214x-GCC-min - Minimal demo for LPC214X. ARM7-LPC214x-GCC-min - Minimal demo for LPC214X.
AVR-AT90CANx-GCC - Port on AVR AT90CAN128, not complete yet. AVR-AT90CANx-GCC - Port on AVR AT90CAN128, not complete yet.
***************************************************************************** *****************************************************************************
*** Releases *** *** Releases ***
@ -44,6 +44,10 @@ AVR-AT90CANx-GCC - Port on AVR AT90CAN128, not complete yet.
chEvtWaitTimeout() code if it is enabled. chEvtWaitTimeout() code if it is enabled.
- Size optimization in the semaphores code, now the chSemWaitTimeout() just - Size optimization in the semaphores code, now the chSemWaitTimeout() just
invokes the chSemWaitTimeoutS() inside its system mutex zone. invokes the chSemWaitTimeoutS() inside its system mutex zone.
- Added a threads create/exit/wait benchmark to the test suite, the system
is capable of 81712 threads started/terminated per second on the reference
LPC2148 board. The figure is inclusive of two context switch operations
for each thread.
- Minor improvement in the LPC214x serial driver, unneeded events were - Minor improvement in the LPC214x serial driver, unneeded events were
generated in some rare cases. generated in some rare cases.
- Fixed a chSysInit() documentation error. - Fixed a chSysInit() documentation error.

View File

@ -19,7 +19,9 @@
#include <ch.h> #include <ch.h>
#if defined(WIN32)
void ChkIntSources(void); void ChkIntSources(void);
#endif
#if defined(WIN32) && defined(_DEBUG) #if defined(WIN32) && defined(_DEBUG)
static WorkingArea(wsT1, 512); static WorkingArea(wsT1, 512);
@ -122,6 +124,11 @@ t_msg Thread6(void *p) {
return 0; return 0;
} }
t_msg Thread7(void *p) {
return (unsigned int)p + 1;
}
/** /**
* Tester thread, this thread must be created with priority \p NORMALPRIO. * Tester thread, this thread must be created with priority \p NORMALPRIO.
*/ */
@ -254,9 +261,29 @@ t_msg TestThread(void *p) {
chThdWait(t1); chThdWait(t1);
print("Messages throughput = "); print("Messages throughput = ");
printn(i); printn(i);
print(" msg/S, "); print(" msgs/S, ");
printn(i << 1); printn(i << 1);
println(" ctxsw/S"); println(" ctxsws/S");
println("*** Kernel Benchmark, threads creation/termination:");
time = chSysGetTime() + 1;
while (chSysGetTime() < time) {
#if defined(WIN32)
ChkIntSources();
#endif
}
time += 1000;
i = 0;
while (chSysGetTime() < time) {
t1 = chThdCreate(chThdGetPriority()-1, 0, wsT1, sizeof(wsT1), Thread7, (void *)i);
i = chThdWait(t1);
#if defined(WIN32)
ChkIntSources();
#endif
}
print("Threads throughput = ");
printn(i);
print(" threads/S");
println("\r\nTest complete"); println("\r\nTest complete");
return 0; return 0;