aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/rt/src/chsys.c6
-rw-r--r--os/rt/src/chthreads.c1
-rw-r--r--readme.txt4
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).