aboutsummaryrefslogtreecommitdiffstats
path: root/os/kernel/include/chsys.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-07-30 09:19:07 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-07-30 09:19:07 +0000
commit9cd24294b8b5c32af4f64762eb99868b1a5c7b75 (patch)
treeb2df22a3590d82fccf843a7f7bb730c71dcdf65f /os/kernel/include/chsys.h
parentf569bcec23452c190248aab184a125f3a52e2eb8 (diff)
downloadChibiOS-9cd24294b8b5c32af4f64762eb99868b1a5c7b75.tar.gz
ChibiOS-9cd24294b8b5c32af4f64762eb99868b1a5c7b75.tar.bz2
ChibiOS-9cd24294b8b5c32af4f64762eb99868b1a5c7b75.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6045 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel/include/chsys.h')
-rw-r--r--os/kernel/include/chsys.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/os/kernel/include/chsys.h b/os/kernel/include/chsys.h
index 722323d54..9663e85ac 100644
--- a/os/kernel/include/chsys.h
+++ b/os/kernel/include/chsys.h
@@ -61,8 +61,9 @@
*/
#define CH_IRQ_PROLOGUE() \
PORT_IRQ_PROLOGUE(); \
- dbg_check_enter_isr(); \
- _stats_increase_irq()
+ _stats_start_measure_isr(); \
+ _stats_increase_irq(); \
+ dbg_check_enter_isr()
/**
* @brief IRQ handler exit code.
@@ -74,6 +75,7 @@
*/
#define CH_IRQ_EPILOGUE() \
dbg_check_leave_isr(); \
+ _stats_stop_measure_isr(); \
PORT_IRQ_EPILOGUE()
/**
@@ -290,6 +292,7 @@ static inline void chSysEnable(void) {
static inline void chSysLock(void) {
port_lock();
+ _stats_start_measure_crit_thd();
dbg_check_lock();
}
@@ -301,6 +304,7 @@ static inline void chSysLock(void) {
static inline void chSysUnlock(void) {
dbg_check_unlock();
+ _stats_stop_measure_crit_thd();
port_unlock();
}
@@ -319,6 +323,7 @@ static inline void chSysUnlock(void) {
static inline void chSysLockFromISR(void) {
port_lock_from_isr();
+ _stats_start_measure_crit_isr();
dbg_check_lock_from_isr();
}
@@ -338,6 +343,7 @@ static inline void chSysLockFromISR(void) {
static inline void chSysUnlockFromISR(void) {
dbg_check_unlock_from_isr();
+ _stats_stop_measure_crit_isr();
port_unlock_from_isr();
}