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

[Green Threads] PInvokes do not swap to the OS stack #2018

Closed
davidwrighton opened this issue Oct 3, 2022 · 0 comments
Closed

[Green Threads] PInvokes do not swap to the OS stack #2018

davidwrighton opened this issue Oct 3, 2022 · 0 comments
Assignees
Labels
area-green-threads Green threads

Comments

@davidwrighton
Copy link
Member

Known issue from #2002

@davidwrighton davidwrighton added the area-green-threads Green threads label Oct 3, 2022
@davidwrighton davidwrighton self-assigned this Oct 21, 2022
davidwrighton added a commit that referenced this issue Oct 27, 2022
Following the example of @jakobbotsch's implementation of CFG, I've implemented a small helper call to transition to the OS thread. (Effectively, it replaces the function pointer jumped to for the P/Invoke to jump through a helper function, after stashing away the extra details needed for the OS thread transition in TLS variables.

This change includes
- The JIT changes to do that
- New helper method enum for the magic helper function
- Implementation of arbitrary helper method
- Refactoring how inGreenThread flag is set so that we don't need an interstitial frame to make it work

Fixes #2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-green-threads Green threads
Projects
None yet
Development

No branches or pull requests

1 participant