8000 extmod/nimble: Add mutex bindings to micropython threading mutex. by andrewleech · Pull Request #6317 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content

extmod/nimble: Add mutex bindings to micropython threading mutex. #6317

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

Closed
wants to merge 1 commit into from

Conversation

andrewleech
Copy link
Contributor

Not sure if this is needed, or whether this implementation is appropriate. Up here for discussion.

@jimmo
Copy link
Member
jimmo commented Aug 12, 2020

I'm not sure this is the right approach as we won't always have threading enabled. Also NimBLE requires this to be a recursive mutex which I'm not sure the mp_thread_mutex is.

On bare-metal I think it's sufficient to build this on top of the existing MICROPY_PY_BLUETOOTH_ENTER (which prevents both context switching and provides mutex with the PENDSV context). On Unix we have the thread mutex which provides a similar thing.

I'm working on adding NimBLE support to the Unix port and have an implementation of this working on that branch.

@andrewleech
Copy link
Contributor Author

This approach wasn't quite right, better fixed have been inlcuded in #6343

@dpgeorge dpgeorge added the extmod Relates to extmod/ directory in source label Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extmod Relates to extmod/ directory in source
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0