aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-11-16 21:21:28 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-11-16 21:21:28 +0000
commit83d562f6b2842c4ec03ff08662ddc629ccc4e424 (patch)
tree4a3e877ce3cb566c1767f87191cc96546897a734 /os/hal/include
parentd70b7e599250fae96dbdc9cbfab11bb9c6d5a649 (diff)
downloadChibiOS-83d562f6b2842c4ec03ff08662ddc629ccc4e424.tar.gz
ChibiOS-83d562f6b2842c4ec03ff08662ddc629ccc4e424.tar.bz2
ChibiOS-83d562f6b2842c4ec03ff08662ddc629ccc4e424.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3504 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include')
-rw-r--r--os/hal/include/adc.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/os/hal/include/adc.h b/os/hal/include/adc.h
index ff9e6b18f..9ebe3754c 100644
--- a/os/hal/include/adc.h
+++ b/os/hal/include/adc.h
@@ -134,15 +134,15 @@ typedef enum {
* @notapi
*/
#define _adc_wakeup_isr(adcp) { \
+ chSysLockFromIsr(); \
if ((adcp)->thread != NULL) { \
Thread *tp; \
- chSysLockFromIsr(); \
tp = (adcp)->thread; \
(adcp)->thread = NULL; \
tp->p_u.rdymsg = RDY_OK; \
chSchReadyI(tp); \
- chSysUnlockFromIsr(); \
} \
+ chSysUnlockFromIsr(); \
}
/**
@@ -153,15 +153,15 @@ typedef enum {
* @notapi
*/
#define _adc_timeout_isr(adcp) { \
+ chSysLockFromIsr(); \
if ((adcp)->thread != NULL) { \
Thread *tp; \
- chSysLockFromIsr(); \
tp = (adcp)->thread; \
(adcp)->thread = NULL; \
tp->p_u.rdymsg = RDY_TIMEOUT; \
chSchReadyI(tp); \
- chSysUnlockFromIsr(); \
} \
+ chSysUnlockFromIsr(); \
}
#else /* !ADC_USE_WAIT */