From 77e8cbb1129075b78280e8569b78cb66e8e7c0d8 Mon Sep 17 00:00:00 2001 From: Ludwig Ortmann Date: Wed, 18 Dec 2013 20:36:42 +0100 Subject: [PATCH] remove ltc disable race --- boards/native/drivers/native-ltc4150.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/boards/native/drivers/native-ltc4150.c b/boards/native/drivers/native-ltc4150.c index d82c686022..e269a6bab6 100644 --- a/boards/native/drivers/native-ltc4150.c +++ b/boards/native/drivers/native-ltc4150.c @@ -26,6 +26,7 @@ #include "cpu.h" #include "cpu-conf.h" #include "hwtimer.h" +#include "irq.h" #define ENABLE_DEBUG (0) #include "debug.h" @@ -60,11 +61,13 @@ static void _native_ltc_int_handler() */ void ltc4150_disable_int(void) { + unsigned state = disableIRQ(); DEBUG("ltc4150_disable_int()\n"); if (_native_ltc_hwtimer_id != -1) { hwtimer_remove(_native_ltc_hwtimer_id); _native_ltc_hwtimer_id = -1; } + restoreIRQ(state); } /**