From b566f82aea098fedc61f0d3b8acb7fd7789b4457 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sat, 6 Feb 2016 10:45:36 +0000 Subject: Fixed bug #697. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8833 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/rt/src/chsys.c | 6 ++++++ os/rt/src/chthreads.c | 1 - readme.txt | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/os/rt/src/chsys.c b/os/rt/src/chsys.c index fd47664a5..a22a66482 100644 --- a/os/rt/src/chsys.c +++ b/os/rt/src/chsys.c @@ -132,6 +132,12 @@ void chSysInit(void) { adjacent to its stack area.*/ currp->p_stklimit = &__main_thread_stack_base__; #endif + +#if CH_DBG_STATISTICS == TRUE + /* Starting measurement for this thread.*/ + chTMStartMeasurementX(&currp->p_stats); +#endif + chSysEnable(); #if CH_CFG_USE_REGISTRY == TRUE diff --git a/os/rt/src/chthreads.c b/os/rt/src/chthreads.c index 9c18788c0..b616ffd92 100644 --- a/os/rt/src/chthreads.c +++ b/os/rt/src/chthreads.c @@ -124,7 +124,6 @@ thread_t *_thread_init(thread_t *tp, tprio_t prio) { #endif #if CH_DBG_STATISTICS == TRUE chTMObjectInit(&tp->p_stats); - chTMStartMeasurementX(&tp->p_stats); #endif #if defined(CH_CFG_THREAD_INIT_HOOK) CH_CFG_THREAD_INIT_HOOK(tp); diff --git a/readme.txt b/readme.txt index 7935dede6..d22a5d2c2 100644 --- a/readme.txt +++ b/readme.txt @@ -76,7 +76,9 @@ - RT: Removed the p_msg field from the thread_t structure saving a msg_t-sized field from the structure. Messages now use a new field into the p_u union. Now synchronous messages are even faster. -- VAR: Fixed missing time convesion in lwIP arch module (bug #696) +- RT: Fixed useless call to chTMStartMeasurementX() in _thread_init() +- VAR: Fixed missing time convesion in lwIP arch module (bug #697) + (backported to 3.0.6 and 16.1.3). (backported to 2.6.10, 3.0.5 and 16.1.2). - HAL: Fixed incorrect handling of TIME_IMMEDIATE in the HAL buffer queues (bug #695)(backported to 16.1.2). -- cgit v1.2.3