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

96 Commits

Author SHA1 Message Date
Oleg Hahm
9a38c1085c Merge pull request #6428 from OTAkeys/fix/xtimer_mutex_infinite_loop
xtimer: fix mutex unlocking in _mutex_timeout
2017-01-20 16:43:38 +01:00
Vincent Dupont
eacffdf490 xtimer: fix mutex unlocking in _mutex_timeout 2017-01-19 18:26:52 +01:00
Oleg Hahm
4f4214235b timex: unambiguous time conversion macros 2017-01-19 13:18:08 +01:00
Martine Lenders
712bd09b2c xtimer: fix for DEBUG 2017-01-18 19:38:05 +01:00
Oleg Hahm
24c205d3a3 xtimer: fix formatter for xtimer_now in DEBUG 2017-01-18 16:20:02 +01:00
Victor Arino
17d6d2a5b5 sys/xtimer: implement mutex lock with timeout 2017-01-12 13:20:26 +01:00
Joakim Nohlgård
63e91151cd xtimer: Add tick conversion 2016-11-28 11:00:42 +01:00
Joakim Nohlgård
4449ba4933 xtimer: Refactor xtimer_usleep_until and rename to xtimer_periodic_wakeup
Rewrote conditions for improved readability, and removed magic number 512
2016-07-29 13:05:02 +02:00
Joakim Nohlgård
da8cd11816 xtimer: Move xtimer_spin_until into xtimer_core.c 2016-07-06 22:23:07 +02:00
Joakim Nohlgård
4fe674f746 xtimer: Add missing space 2016-07-06 22:23:06 +02:00
Joakim Nohlgård
7c70d3bc4f xtimer: Add Eistec copyright and author 2016-07-06 22:23:05 +02:00
Joakim Nohlgård
4d862955c2 xtimer: Rename XTIMER -> XTIMER_DEV 2016-07-06 22:23:04 +02:00
Joakim Nohlgård
2f832117f8 xtimer: prefix _lltimer_now, _lltimer_mask with _xtimer 2016-07-06 22:23:04 +02:00
7718f114cb all: remove pointer casts for msg.content.ptr 2016-06-02 23:13:42 +02:00
Ian Martin
31c6bcc4d8 xtimer: return after xtimer_spin() when within an ISR 2016-05-10 13:30:40 -04:00
DipSwitch
0bb4748a94 core: Fix/refactor function naming in core/incude/irq.h 2016-03-20 16:47:34 +01:00
9e3081849e sys: xtimer: fix some race conditions 2016-03-09 01:51:59 +01:00
Ian Martin
856c5e1539 s/XTIMER_RSHIFT/XTIMER_USEC_TO_TICKS/g
s/XTIMER_LSHIFT/XTIMER_TICKS_TO_USEC/g
2016-03-01 15:18:45 -05:00
Ian Martin
f86c118594 xtimer: define XTIMER_RSHIFT() and XTIMER_LSHIFT() macros to avoid using XTIMER_SHIFT directly. 2016-03-01 15:15:19 -05:00
Hauke Petersen
e9d79a37d6 sys/xtimer: adapted to timer API changes 2016-02-29 14:45:00 +01:00
malo
9b8fe52d5d xtimer: Fixed _add_timer_to_long_list since timer could be added at the wrong position.
Signed-off-by: malo <malo@25cmsquare.io>
2016-02-26 12:32:45 +01:00
malo
93eb56c612 xtimer: Fixed case when _xtimer_set_absolute called with target < now and target has _this_high_period .
Signed-off-by: malo <malo@25cmsquare.io>
2016-02-26 12:27:15 +01:00
Joakim Nohlgård
df416c1b76 sys/xtimer: Update to match timer_init API changes 2016-02-13 21:29:36 +01:00
2d1ad4b31e Merge pull request #4272 from OlegHahm/xtimer_msg_receive_timeout
xtimer: implement missing msg receive timeout
2015-11-29 00:02:08 +01:00
Oleg Hahm
0ddd6ec15e xtimer: implement xtimer_msg_receive_timeout 2015-11-23 20:45:25 +01:00
2640277156 sys: xtimer: add posix sleep/usleep wrapper 2015-11-20 00:44:28 +01:00
Joakim Nohlgård
d1b4e7a70b xtimer: Rename _xtimer_now() -> _lltimer_now()
This matches _lltimer_set() and _lltimer_mask()
2015-10-28 13:54:54 +01:00
Joakim Nohlgård
d432bb42b0 xtimer: rename _mask -> _lltimer_mask 2015-10-28 13:52:25 +01:00
Joakim Nohlgård
fb0322ee1b xtimer: Add spaces for readability 2015-10-28 13:51:23 +01:00
Joakim Nohlgård
e8f33c2ca0 xtimer: Add parentheses to condition 2015-10-28 13:51:23 +01:00
725473d9a6 sys: xtimer: make xtimer use div.h 2015-10-12 23:25:59 +02:00
c2f6417bea sys: xtimer: add another safeguard against setting a timer in the past 2015-10-07 18:56:31 +02:00
Joakim Nohlgård
b365ab45cb sys/xtimer: Avoid race incrementing multiple periods in _timer_callback
On a fast CPU with a slow timer (e.g. XTIMER_SHIFT > 0) it is possible
that now == _xtimer_now() when spinning for the overflow. In the extreme
case When this happens _next_period() will be called more than once
until the timer overflows for real.

Fault observed in real life when running on a 32.768 kHz timer on a
~96 MHz clocked mulle (Kinetis K60, Cortex-M4). _next_period() was
called 9 times during the same ISR call before the 32 kHz timer
overflowed.
2015-09-30 10:21:33 +02:00
Joakim Nohlgård
983b299745 sys/xtimer: xtimer_set: Reduce scope on target variable 2015-09-28 14:23:23 +02:00
Joakim Nohlgård
7f254c6d12 sys/xtimer: rename _ms_to_sec -> _us_to_sec to reflect actual functionality
The function divides the argument by 1000000, (microsecond to seconds)
2015-09-28 14:23:16 +02:00
Joakim Nohlgård
75d0281ef3 xtimer-core: Use xtimer_now as reference time instead of future timer target 2015-09-25 16:12:06 +02:00
Oleg Hahm
38148c2d48 xtimer: initialize struct members
The xtimer_t struct members target and long_target are used in _is_set() function in xtimer_remove(), but will be uninitialized.
2015-09-20 02:00:55 +02:00
a719e7d61f sys: xtimer: some updates
- more robust underflow protection in xtimer_usleep_until()
- use relative target in xtimer_spin()
- honour reference in isr when spinning until timer target
- add XTIMER_BACKOFF to xtimer_spin_until() target when backing off in
  _timer_set_absolute()
- doxygen updates
2015-09-16 12:34:31 +02:00
40812e722e sys: xtimer: use relative spin in absolute set functions 2015-09-16 11:13:42 +02:00
48611c0572 sys: xtimer: avoid setting timers multiple times from within ISR 2015-09-16 11:13:41 +02:00
a0d78cf989 sys: xtimer: disable timer before shooting in isr handler 2015-09-16 10:58:56 +02:00
691fe95546 sys: xtimer: use XTIMER_SHIFT in mask, add doxygen 2015-09-16 10:58:56 +02:00
cb0337d77e sys: xtimer: xtimer_set(): shoot directly if offset <= 1 2015-09-16 10:58:56 +02:00
e27ce2465f sys: xtimer: add xtimer_wakeup64 2015-09-16 10:58:54 +02:00
383ada9349 sys: xtimer: always set long_target, even for short timers 2015-09-05 09:13:26 +02:00
808a8bc899 sys: xtimer: introduce new timer subsystem 2015-08-25 13:20:35 +02:00