1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-27 15:31:17 +01:00

Merge pull request #1901 from OlegHahm/hwtimer_irq_fixup

core: eliminate warning in hwtimer
This commit is contained in:
Oleg Hahm 2014-10-30 16:11:42 +01:00
commit 3d0be082e3
2 changed files with 6 additions and 9 deletions

View File

@ -150,16 +150,12 @@ static int _hwtimer_set(unsigned long offset, void (*callback)(void*), void *ptr
unsigned state;
if (!inISR()) {
state = disableIRQ();
}
state = disableIRQ();
int n = lifo_get(lifo);
if (n == -1) {
if (!inISR()) {
restoreIRQ(state);
}
restoreIRQ(state);
puts("No hwtimer left.");
return -1;
@ -179,9 +175,7 @@ static int _hwtimer_set(unsigned long offset, void (*callback)(void*), void *ptr
lpm_prevent_sleep++;
if (!inISR()) {
restoreIRQ(state);
}
restoreIRQ(state);
return n;
}

View File

@ -16,6 +16,9 @@
* This file acts as a wrapper between the kernels interrupt interface and the architecture
* dependent implementation of the interfaces.
*
* @note All functions in this module have to be implemented in a way that it
* is safe to call them from within the context of an ISR.
*
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
*/