-
Notifications
You must be signed in to change notification settings - Fork 367
Take second core's closure by value #739
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
Conversation
634fa20 to
a9dd9e9
Compare
f4654dd to
e89b17e
Compare
|
Nice! I wonder if we want to remove that AppCoreGuard thing? It's probably more annoying than it helps? |
|
I was wondering if I can move the core parking method to that struct, anfld maybe give it an "is_runninh" but we can remove it for sure. It has some uses in holding on to lifetimes so not everything had to be 'static |
|
Let me know if you want me to do anything about it, I'm personally fine with either option. |
|
Let's see what other's opinions are on that - it also shouldn't block this PR. Can be done separately |
@jessebraham @MabezDev any opinion on removing or keeping the guard? otherwise this seems fine to merge I guess |
MabezDev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, forgot about this. I think we can leave the guard for now. I don't see a super-pressing reason to remove it right now.
This PR looks good to me though, thanks @bugadani for taking care of this!
|
Seems no one else complains ..... Will merge this now |
Thank you!
Thank you for your contribution.
Please make sure that your submission includes the following:
Must
errorsorwarnings.cargo fmtwas run.CHANGELOG.mdin the proper section.Nice to have
Closes #543
I've taken the liberty of removing some of the documentation that made no sense. There is no fine-grained control here, just start and pause/resume and only of the second core :)
This PR changes the second core's program to a
FnOnceclosure, and copies it to some arbitrary place (properly aligned address at the physical bottom of the stack) in the second core's stack before starting the core. I've changed the Stack's alignment based on what I've seen in the Xtensa ISA, and the code now asserts at compile time that the top of the stack is properly aligned (too).I've also changed the Stack to be uninitialized as I don't think stack needs to be zeroed. Please do correct me if I'm wrong!
This PR allows the second core's function to return. In this case, the implementation just parks the core.