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
..
2019-03-05 16:10:06 +01:00
2019-10-08 10:26:23 +02:00
2019-10-09 11:05:01 +02:00
2019-10-08 15:38:27 +02:00
2018-09-11 11:29:19 +02:00
2019-09-12 23:01:58 +02:00
2019-05-28 22:49:19 +02:00
2019-10-04 11:35:52 +02:00
2018-09-28 09:33:40 +02:00
2019-02-13 13:31:52 +01:00
2019-10-08 20:58:52 +02:00
2018-10-18 13:37:21 +02:00
2018-10-20 09:30:40 -04:00
2019-05-16 12:01:36 +02:00
2019-07-17 20:51:32 +02:00
2019-08-20 22:18:54 +02:00
2019-05-29 15:50:25 +02:00
2019-08-05 16:57:36 +02:00
2019-10-11 13:36:13 +02:00
2019-05-02 12:09:37 +02:00
2019-08-13 14:49:10 +02:00
2019-06-05 18:13:57 +02:00
2019-09-09 20:27:16 +02:00
2018-08-24 18:14:03 +02:00
2019-10-11 10:59:14 +02:00
2019-10-04 13:49:57 +02:00
2018-09-27 10:54:39 +02:00
2019-09-09 10:18:49 +02:00
2019-09-17 20:43:33 +02:00
2019-09-11 18:25:10 +02:00
2019-09-13 11:37:44 +02:00
2018-11-20 08:34:53 +01:00
2018-09-25 12:03:58 +02:00
2019-05-02 12:09:37 +02:00
2019-08-06 19:43:54 +02:00
2018-09-20 23:54:46 +02:00
2019-09-13 11:37:44 +02:00
2018-08-24 18:14:03 +02:00
2019-10-07 19:18:40 +02:00
2018-08-30 11:14:59 +02:00
2019-06-23 22:16:03 +02:00
2019-10-09 13:51:29 +02:00
2019-08-15 12:26:28 +02:00
2019-06-05 17:10:26 +02:00
2019-06-18 11:14:11 +02:00
2018-09-25 12:03:58 +02:00
2019-09-30 18:40:59 +02:00
2018-10-03 10:44:14 +02:00
2018-08-30 11:14:59 +02:00
2019-11-27 14:48:51 +01:00
2019-04-12 15:51:15 +02:00
2019-10-11 10:59:14 +02:00
2019-08-20 22:18:54 +02:00
2019-10-11 10:59:14 +02:00