From 7afcf9acacda0d24835a0c803d76b467396b3733 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sat, 6 Feb 2016 10:45:17 +0000 Subject: [PATCH] Fixed bug #697. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_16.1.x@8830 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/rt/include/ch.h | 4 ++-- os/rt/src/chsys.c | 6 ++++++ os/rt/src/chthreads.c | 1 - readme.txt | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/os/rt/include/ch.h b/os/rt/include/ch.h index bbc1b8be7..f7b35ad99 100644 --- a/os/rt/include/ch.h +++ b/os/rt/include/ch.h @@ -48,7 +48,7 @@ /** * @brief Kernel version string. */ -#define CH_KERNEL_VERSION "3.1.1" +#define CH_KERNEL_VERSION "3.1.2" /** * @brief Kernel version major number. @@ -63,7 +63,7 @@ /** * @brief Kernel version patch number. */ -#define CH_KERNEL_PATCH 1 +#define CH_KERNEL_PATCH 2 /** @} */ /* Core headers.*/ diff --git a/os/rt/src/chsys.c b/os/rt/src/chsys.c index 7e0a6c806..5427ca0af 100644 --- a/os/rt/src/chsys.c +++ b/os/rt/src/chsys.c @@ -128,6 +128,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 de3e3fd12..42bf558d0 100644 --- a/readme.txt +++ b/readme.txt @@ -73,6 +73,7 @@ ***************************************************************************** *** 16.1.3 *** +- VAR: Fixed missing time convesion in lwIP arch module (bug #697). - VAR: Fixed missing time convesion in lwIP arch module (bug #696, again). *** 16.1.2 ***