Skip to content

sys/xtimer: fix xtimer_mutex_lock_timeout corner cases (#2)#11225

Closed
vincent-d wants to merge 3 commits intoRIOT-OS:masterfrom
OTAkeys:fix/xtimer-mutex
Closed

sys/xtimer: fix xtimer_mutex_lock_timeout corner cases (#2)#11225
vincent-d wants to merge 3 commits intoRIOT-OS:masterfrom
OTAkeys:fix/xtimer-mutex

Conversation

@vincent-d
Copy link
Member

Contribution description

This is a rebase of #6441.

Testing procedure

Use xtimer_mutex test app.

Issues/PRs references

#6441

@vincent-d vincent-d added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: timers Area: timer subsystems labels Mar 21, 2019
@vincent-d vincent-d requested review from cladmi and kaspar030 March 21, 2019 08:03
Copy link
Contributor

@cladmi cladmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@miri64
Copy link
Member

miri64 commented Jun 25, 2020

According to @JulianHolzwarth (#6441 (comment)) this should be fixed.

@miri64 miri64 closed this Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: timers Area: timer subsystems CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants