diff --git a/doc/rt/reports/benchmarks/rt-stm32g4-170mhz-gcc.txt b/doc/rt/reports/benchmarks/rt-stm32g4-170mhz-gcc.txt index 529b752a6..656dc4592 100644 --- a/doc/rt/reports/benchmarks/rt-stm32g4-170mhz-gcc.txt +++ b/doc/rt/reports/benchmarks/rt-stm32g4-170mhz-gcc.txt @@ -1,11 +1,11 @@ *** ChibiOS/RT Test Suite *** -*** Compiled: Jun 11 2021 - 13:55:11 +*** Compiled: Jun 12 2021 - 07:55:58 *** Platform: STM32G4 Hi-resolution Line *** Test Board: STMicroelectronics STM32 Nucleo64-G474RE *** -*** Text size: 51060 bytes +*** Text size: 51108 bytes *** RO data size: 9904 bytes *** Data size: 220 bytes *** BSS size: 5400 bytes @@ -205,11 +205,11 @@ --- Result: SUCCESS ---------------------------------------------------------------------------- --- Test Case 12.5 (Threads performance, full cycle) ---- Score : 518288 threads/S +--- Score : 521467 threads/S --- Result: SUCCESS ---------------------------------------------------------------------------- --- Test Case 12.6 (Threads performance, create/exit only) ---- Score : 643936 threads/S +--- Score : 653843 threads/S --- Result: SUCCESS ---------------------------------------------------------------------------- --- Test Case 12.7 (Mass reschedule performance) @@ -249,11 +249,11 @@ Final result: SUCCESS *** ChibiOS OS Library Test Suite *** -*** Compiled: Jun 11 2021 - 13:55:11 +*** Compiled: Jun 12 2021 - 07:55:58 *** Platform: STM32G4 Hi-resolution Line *** Test Board: STMicroelectronics STM32 Nucleo64-G474RE *** -*** Text size: 51060 bytes +*** Text size: 51108 bytes *** RO data size: 9904 bytes *** Data size: 220 bytes *** BSS size: 5400 bytes diff --git a/os/rt/src/chsem.c b/os/rt/src/chsem.c index bc032305d..51073fe89 100644 --- a/os/rt/src/chsem.c +++ b/os/rt/src/chsem.c @@ -265,7 +265,7 @@ msg_t chSemWaitTimeoutS(semaphore_t *sp, sysinterval_t timeout) { "inconsistent semaphore"); if (--sp->cnt < (cnt_t)0) { - if (TIME_IMMEDIATE == timeout) { + if (unlikely(TIME_IMMEDIATE == timeout)) { sp->cnt++; return MSG_TIMEOUT; diff --git a/os/rt/src/chthreads.c b/os/rt/src/chthreads.c index 9afcc5abb..c4d44da15 100644 --- a/os/rt/src/chthreads.c +++ b/os/rt/src/chthreads.c @@ -520,7 +520,7 @@ void chThdExitS(msg_t msg) { #if CH_CFG_USE_WAITEXIT == TRUE /* Waking up any waiting thread.*/ - while (ch_list_notempty(&currtp->waiting)) { + while (unlikely(ch_list_notempty(&currtp->waiting))) { (void) chSchReadyI((thread_t *)ch_list_unlink(&currtp->waiting)); } #endif diff --git a/os/rt/src/chvt.c b/os/rt/src/chvt.c index 01db1bb45..5e277685a 100644 --- a/os/rt/src/chvt.c +++ b/os/rt/src/chvt.c @@ -445,7 +445,7 @@ void chVTDoTickI(void) { chSysLockFromISR(); /* If a reload is defined the timer needs to be restarted.*/ - if (vtp->reload > (sysinterval_t)0) { + if (unlikely(vtp->reload > (sysinterval_t)0)) { sysinterval_t delay; /* Refreshing the current time after spending time in the callback for