1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

33 Commits

Author SHA1 Message Date
Ludwig Ortmann
f677f70836 core/hwtimer: add HWTIMER_WAIT_OVERHEAD 2014-10-01 19:53:43 +02:00
Ludwig Ortmann
da550bc913 introduce HWTIMER_SPIN_BARRIER (API change)
Boards should define HWTIMER_SPIN_BARRIER that is used to decide
whether it makes sense to set a timer and yield or call hwtimer_spin
instead.
Used by `core/hwtimer.c` and `sys/vtimer/vtimer.c`.
A default value is provided and a warning is printed when it is used.
2014-10-01 19:53:42 +02:00
Kévin Roussel
d1cf9c4bfd Ensure hwtimer_spin() won't wait for an unreachable stop counter value
without using a costly MOD operation
2014-08-28 15:01:58 +02:00
Ludwig Ortmann
3ca4f18479 doc: use lgplv2.1-short license header instead of lgpl-short-riot 2014-07-31 22:57:20 +02:00
René Kijewski
6fae042a60 core: remove unneeded calls to mutex_init() 2014-07-29 09:33:24 +02:00
Hauke Petersen
9001e0c2fb core: removed duplicated hwtimer_arch.h 2014-07-09 21:08:13 +02:00
Ludwig Ortmann
9d4a92003c core/hwtimer: disable interrupts in hwtimer_remove
Before only the hardware timer's own interrupt was being disabled.
This led to a race condition in the following scenario:

```
Thread1:
    hwtimer_remove()
    hwtimer_arch_disable_interrupt();

// INTERRUPT -> Thread2 (which has a higher priority than Thread1) gets scheduled

Thread2:
    ...
    hwtimer_remove()
    hwtimer_arch_disable_interrupt(); // hwtimer interrupt is already disabled
    ...
    hwtimer_arch_enable_interrupt();
    ...
   // yield | terminate -> Thread1 gets scheduled again

Thread1:
    ... // these instructions are being run with the hwtimer interrupt enabled
    hwtimer_arch_enable_interrupt(); // hwtimer interrupt is already enabled
```

Fixes #924
2014-05-16 15:48:48 +02:00
Hauke Petersen
7545eff784 core/cpu/board: moved F_CPU define to board 2014-05-06 10:36:09 +02:00
Kévin Roussel
f763cb9ec2 Make implementation of hwtimer_spin() easier to read and understand 2014-04-28 13:39:30 +02:00
Hauke Petersen
8a937e1a1c hwtimer: clean up of interfaces to board/cpu 2014-03-26 13:19:18 +01:00
Oleg Hahm
24f5ec929c removed duplicate inISR prototype 2014-02-24 18:42:13 +01:00
Ludwig Ortmann
2525920426 remove trailing whitespace and newlines 2014-02-11 18:45:06 +01:00
Oleg Hahm
891eebd361 Merge pull request #427 from mehlis/hwtimer-debug
added some debug output
2013-12-16 08:31:03 -08:00
Hauke Petersen
3785fe956b Fixed doxygen comments, focused on file headers and group definitions 2013-12-16 14:00:24 +01:00
Christian Mehlis
2527d3d636 added some debug output 2013-12-16 11:13:43 +01:00
f85adf608f change my email address
kaspar.schleiser@fu-berlin.de will be obsoleted soon. Replace it with
kaspar@schleiser.de, which will (hopefully) stay.
2013-12-04 15:09:56 +01:00
Ludwig Ortmann
d6c213fb47 fix grammar in license header 2013-11-23 13:11:56 +01:00
Ludwig Ortmann
05431e9e86 improve comments, rename variable 2013-11-14 12:06:53 +01:00
Ludwig Ortmann
2d419e6648 save one long 2013-11-14 12:06:52 +01:00
Ludwig Ortmann
e8a03a8287 improve fix and comment 2013-11-14 12:06:52 +01:00
Ludwig Ortmann
1ef31b3813 fix race condition in hwtimer_spin 2013-11-14 12:06:52 +01:00
Christian Mehlis
735c41786d remove unused static function 2013-08-12 11:25:07 +02:00
Christian Mehlis
6428bd5546 use std include style 2013-08-12 11:24:57 +02:00
Christian Mehlis
00d618634c add missing include for mutex 2013-08-12 11:24:48 +02:00
Oleg Hahm
3f95d72828 fix for #25 by using mutexes for hwtimer_wait 2013-08-08 20:11:57 +02:00
Oliver Hahm
c8bee9e554 fixed coding style (space after most keywords) 2013-06-24 22:37:35 +02:00
Oliver Hahm
ffeb6f8523 fixed coding conventions (correctly this time) 2013-06-20 18:18:29 +02:00
Oliver Hahm
0d6d8390c0 * updated copyright and license headers in various files 2013-06-18 17:21:38 +02:00
Oliver Hahm
918a31cf8c [core hwtimer] [cpu arm]
* adapted core and arm cpu
2012-03-08 18:58:39 +01:00
5838ce604b * hwtimer: switched to lifo 2010-12-10 16:50:16 +01:00
Oliver Hahm
e335ccfb43 * fixed wrong return value for thread_wakeup
* changed hwtimer_wait to use thread_sleep instead of mutexes
2010-11-04 16:21:39 +01:00
0f4a72974a * hwtimer.c cosmetics 2010-11-01 15:50:31 +01:00
91ae1eb6fd * import from old firekernel repository 2010-09-22 15:10:42 +02:00