Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added arch specific mutex implementation #209

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

korken89
Copy link
Contributor

I started the implementation for an arch specific mutex to get discussion going.

@rust-highfive
Copy link

r? @therealprof

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-cortex-m labels Apr 21, 2020
Copy link
Contributor

@jonas-schievink jonas-schievink left a comment

Choose a reason for hiding this comment

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

CriticalSectionMutex is not Sync, so it doesn't really work as a mutex like this

src/mutex.rs Outdated Show resolved Hide resolved
@jamesmunns
Copy link
Member

Hey @korken89, I'm not sure it's possible to share this mutex between an interrupt and main with this, at least without using unsafe, as your mutex is not Sync.

Additionally, it's kind of a bummer that this mutex panics if the resource is taken, but I guess that was already decided based on the Mutex-Trait API.

@korken89
Copy link
Contributor Author

Right, I have to move to UnsafeCell

@jonas-schievink
Copy link
Contributor

What happens now if I lock the mutex while already holding it?

@korken89
Copy link
Contributor Author

Ah right, now I remember the original issue around the implementation - thanks for pointing it out.
I'll take a another look the upcoming days.

@therealprof therealprof added the nominated Issue nominated as discussion topic for the Embedded WG meeting label Jul 20, 2020
@therealprof
Copy link
Contributor

Discussion from the meeting: Seems this has stalled out. Maybe this could be another focus project? If people are interested in joining such a group, please speak up.

The MSP430 team is considering taking over the current implementation from bare-metal to not keep unneeded dependencies around.

adamgreig pushed a commit that referenced this pull request Jan 12, 2022
209: Bump cortex-m-rt-macro version to 0.1.6 for release r=korken89 a=therealprof

Closes #206

Signed-off-by: Daniel Egger <daniel@eggers-club.de>

Co-authored-by: Daniel Egger <daniel@eggers-club.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nominated Issue nominated as discussion topic for the Embedded WG meeting S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-cortex-m
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants