aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-03-10 13:00:39 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-03-10 13:00:39 +0000
commita849378300019b9d6c030ab7af46bfda646e619e (patch)
treedf2e0a580d157db179c0dc6cd6f56e22d9974ccf /os/hal/include
parentf27e4f46fe7db437775838da11e125f722e81c11 (diff)
downloadChibiOS-a849378300019b9d6c030ab7af46bfda646e619e.tar.gz
ChibiOS-a849378300019b9d6c030ab7af46bfda646e619e.tar.bz2
ChibiOS-a849378300019b9d6c030ab7af46bfda646e619e.zip
Fixed bug 3205410.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2813 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include')
-rw-r--r--os/hal/include/adc.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/os/hal/include/adc.h b/os/hal/include/adc.h
index 8bc013b38..b0d6d0938 100644
--- a/os/hal/include/adc.h
+++ b/os/hal/include/adc.h
@@ -124,9 +124,10 @@ typedef enum {
*/
#define _adc_wakeup_isr(adcp) { \
if ((adcp)->thread != NULL) { \
- Thread *tp = (adcp)->thread; \
- (adcp)->thread = NULL; \
+ Thread *tp; \
chSysLockFromIsr(); \
+ tp = (adcp)->thread; \
+ (adcp)->thread = NULL; \
tp->p_u.rdymsg = RDY_OK; \
chSchReadyI(tp); \
chSysUnlockFromIsr(); \