sys/xtimer: fix xtimer_mutex_lock_timeout corner cases (#2)#11225
sys/xtimer: fix xtimer_mutex_lock_timeout corner cases (#2)#11225vincent-d wants to merge 3 commits intoRIOT-OS:masterfrom
Conversation
cladmi
left a comment
There was a problem hiding this comment.
I ended up seeing that code recently and I already see issues with the original one.
My first issue I see is first that removing a process from its mutex queue should maybe more be done in mutex.c not outside.
Also, as it is currently maybe called after spinning, it may be called outside of interrupt context, (that's an xtimer behavior) so modifying the queue without protecting the queue… I already imagine issues there. And talking to the scheduler too.
I see that you do sched_context_switch_request and this would only work called from an interrupt context right ?
And currently, the first commit changes a lot of things without really explaining each steps so I find it hard to review each part.
|
According to @JulianHolzwarth (#6441 (comment)) this should be fixed. |
Contribution description
This is a rebase of #6441.
Testing procedure
Use
xtimer_mutextest app.Issues/PRs references
#6441