diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-02-06 10:45:36 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-02-06 10:45:36 +0000 |
commit | b566f82aea098fedc61f0d3b8acb7fd7789b4457 (patch) | |
tree | c7e2f4f4cc43a0c748ed7010765c4bbb84e49ef2 /os | |
parent | dfd71f419d02f1f139ab614a88393aaab53654e5 (diff) | |
download | ChibiOS-b566f82aea098fedc61f0d3b8acb7fd7789b4457.tar.gz ChibiOS-b566f82aea098fedc61f0d3b8acb7fd7789b4457.tar.bz2 ChibiOS-b566f82aea098fedc61f0d3b8acb7fd7789b4457.zip |
Fixed bug #697.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8833 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r-- | os/rt/src/chsys.c | 6 | ||||
-rw-r--r-- | os/rt/src/chthreads.c | 1 |
2 files changed, 6 insertions, 1 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);
|