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

Annotate several DirectX methods as SuppressGCTransition #260

Merged
merged 2 commits into from
Nov 24, 2021

Conversation

tannergooding
Copy link
Member

This annotates several DirectX methods with SuppressGCTransition where they meet all the requirements:

  • Native function always executes for a trivial amount of time (less than 1 microsecond).
  • Native function does not perform a blocking syscall (for example, any type of I/O).
  • Native function does not call back into the runtime (for example, Reverse P/Invoke).
  • Native function does not throw exceptions.
  • Native function does not manipulate locks or other concurrency primitives.

Notably, that effectively restricts it to Get* methods that are just return field.

@tannergooding tannergooding merged commit 4b42f17 into terrafx:main Nov 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant