aboutsummaryrefslogtreecommitdiffstats
path: root/os/kernel/src/chstats.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-07-31 12:26:02 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-07-31 12:26:02 +0000
commitceea042aaf3e373b598b3295c256feaef4e4236c (patch)
tree093a071d95eace2b0aec62bcf77f78d41df542fa /os/kernel/src/chstats.c
parent16044c7aeac671a4914749a387a6c526f0b2fdce (diff)
downloadChibiOS-ceea042aaf3e373b598b3295c256feaef4e4236c.tar.gz
ChibiOS-ceea042aaf3e373b598b3295c256feaef4e4236c.tar.bz2
ChibiOS-ceea042aaf3e373b598b3295c256feaef4e4236c.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6056 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel/src/chstats.c')
-rw-r--r--os/kernel/src/chstats.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/os/kernel/src/chstats.c b/os/kernel/src/chstats.c
index 93739da17..06ac21d1d 100644
--- a/os/kernel/src/chstats.c
+++ b/os/kernel/src/chstats.c
@@ -83,11 +83,12 @@ void _stats_increase_irq(void) {
}
/**
- * @brief Increases the context switch counter.
+ * @brief Updates context switch related statistics.
*/
-void _stats_increase_ctxswc(void) {
+void _stats_ctxswc(thread_t *ntp, thread_t *otp) {
kernel_stats.n_ctxswc++;
+ chTMChainMeasurementToX(&otp->p_stats, &ntp->p_stats);
}
/**