sys/xtimer: Fix possible race condition in xtimer where sleep is added to the wrong list.#7116
sys/xtimer: Fix possible race condition in xtimer where sleep is added to the wrong list.#7116DipSwitch wants to merge 1 commit intoRIOT-OS:masterfrom
Conversation
|
fixed by: #7053 |
|
What should we do here ? I'm not sure #7053 has consensus. |
|
inconclusive discussion, remove milestone |
|
Is there still interest to merge this bug fix??!? |
|
Ended up here as I was testing xtimer_now in masked interrupts/interrupt context and found this issue also listed in the I disagree that #7053 solves the issue in general. You could still be de-scheduled before doing I agree with that change, as it is the only way to ensure that the comparison with the target has an effect and that we do not get de-scheduled after. However I am afraid as |
|
I think this has been fixed with #9530. |
I have a problem where
xtimer_usleepthinks that it should place the timer into the timers long list while(timer->long_target > _long_cnt)are both0but|| !_this_high_period(target)says it's not this period. But when the timer is added to the long list. It doesn't trigger for aprox 1,5 hour instead of in 69uS.Below the log and possible solution to fix.
To solve this problem xtimer_set_absolute should be changed to something like this:
Possible related threads: