JulianHolzwarth
bce45fd9d8
xtimer/xtimer.c: xtimer_mutex_lock_timeout fix test
...
Handling timeout smaller than XTIMER_BACKOFF (the timer spins) when the mutex is already locked.
This fixes the test tests/xtimer_mutex_lock_timeout/main.c:mutex_timeout_spin_locked.
2020-03-05 18:56:35 +01:00
JulianHolzwarth
dfeaea3c36
sys/xtimer/xtimer.c: comment change
2020-03-05 18:45:27 +01:00
Hauke Petersen
58e381979f
xtimer: add xtimer_set_timeout_flag64()
2020-02-13 15:37:14 +01:00
Hyungsin
eadd4c9f72
sys/xtimer: compare two offsets rather than absolute times
2020-01-29 10:52:43 -08:00
JulianHolzwarth
70923d0c1b
xtimer/xtimer.c:_mutex_timeout() improved
...
no longer into the "if" when the mutex is free
2020-01-22 18:40:29 +01:00
Hyungsin
387344775b
sys: xtimer concurrency/robustness improvement
2020-01-10 10:06:16 -08:00
MichelRottleuthner
272079c89e
Merge pull request #11992 from JulianHolzwarth/pr/xtimer_mutex_lock_timeout/first_fix
...
sys/xtimer/xtimer.c: _mutex_timeout() bug fix for race condition
2019-12-04 10:43:20 +01:00
JulianHolzwarth
7cd3e8b73e
xtimer/xtimer.c:_mutex_timeout() improved
...
no longer into the "if" when the mutex is free
2019-11-27 14:49:16 +01:00
Pieter Willemsen
f3b13cf90c
xtimer: check in timeout callback if thread blocked on mutex
...
Prevent a possible race condition when _mutex_timeout fires just after the
mutex was locked but before the xtimer was removed
The flow
int xtimer_mutex_lock_timeout(mutex_t *mutex, uint64_t timeout) {
...
mutex_lock(mutex);
/* mutex locked */
/* _mutex_timeout fires and tries to remove thread from mutex queue */
/* DEBUG: simulate callback call between lock and remove */
xtimer_spin(xtimer_ticks_from_usec(timeout*2));
xtimer_remove(&t);
...
}
2019-11-27 14:48:51 +01:00
2ea1b24eae
sys/xtimer: fix typos
2019-11-23 22:39:38 +01:00
Marian Buschsieweke
cd1ce6b98d
sys/xtimer: Remove dependency to core_msg
...
When module `core_msg` is not used, `xtimer` now no longer provides the features
related to messages. This allows using `xtimer` without `core_msg`.
2019-10-31 19:55:50 +01:00
JulianHolzwarth
c1f58186cb
xtimer/xtimer.c: sched_switch instead of yield
...
because of pr #11759 : not all boards check for is_in_irq when thread_yield_higher
2019-08-09 17:29:40 +02:00
JulianHolzwarth
1bcb4fcc5f
xtimer/xtimer.c: _mutex_timeout improvements
...
Only yields and change threads status when thread was removed from mutex list.
2019-08-09 17:29:40 +02:00
JulianHolzwarth
a321dfc51d
xtimer/xtimer.c: ensure modifing mutex is done with interrupt disabled
...
if xtimer_set spins the callback is executed in the thread context.
comment to explain irq_disable
and when this line could be removed
(when xtimer stops executing the callback funtion from thread context)
2019-08-09 17:28:54 +02:00
JulianHolzwarth
1fff551d7c
xtimer/xtimer.c: fix timeout is volatile
...
timeout is modified from interupt context so must be volatile
2019-06-05 14:20:16 +02:00
JulianHolzwarth
301d88c04a
xtimer/xtimer.c document mutex_thread_t
...
comment for mutex_thread_t
2019-06-05 14:16:30 +02:00
069a1f6e8b
sys/xtimer: make xtimer_mutex_lock_timeout() actually use us arg
2019-03-12 16:09:04 +01:00
Josarn
672368954e
xtimer: timer & target overflow, hang resolved.
...
1. When the 32 bit target of the xtimer overflowed the timer was not placed in the right list.
2. When the hardware timer overflowed the comparison was wrong for setting next target.
3. Backoff condition
2018-11-01 16:48:20 +01:00
josar
f770d17e12
xtimer_core: uncrustify
2018-09-18 16:13:18 +02:00
7d013eb2b6
sys: fix doxygen grouping
2018-06-11 19:12:02 +02:00
Martine Lenders
0a0bb86f4a
posix: move time functions to their own module
2017-11-12 19:55:57 +01:00
35f329e05c
sys/xtimer: add xtimer_set_timeout_flag()
2017-09-01 23:54:28 +02:00
Joakim Nohlgård
8e10e6e3fa
xtimer: Use {} for empty while loops
2017-06-10 06:34:24 +02:00
185c7ac11b
some (ptr == 0) -> (ptr == NULL) fixes (found by coccinelle)
2017-04-20 23:31:32 +02:00
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