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

Move import of stdatomic to ASRecursiveUnfairLock implementation file #trivial #1180

Merged
merged 1 commit into from
Oct 19, 2018

Conversation

maicki
Copy link
Contributor

@maicki maicki commented Oct 17, 2018

This should fix a problem if a ASRecursiveUnfairLock is imported in a non c++ compiled file as the implementation file will not have access to stdatomic.h.

Copy link
Member

@Adlai-Holler Adlai-Holler left a comment

Choose a reason for hiding this comment

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

Hmm don't know about this. _Atomic(pthread_t) below needs someone to import the atomic header.

@maicki
Copy link
Contributor Author

maicki commented Oct 18, 2018

@Adlai-Holler Since C11, _Atomic is a keyword and therefore we don't have to include the header in this case: https://en.cppreference.com/w/c/keyword

Copy link
Member

@Adlai-Holler Adlai-Holler left a comment

Choose a reason for hiding this comment

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

If it works it works! 👍

@maicki maicki merged commit dc49ce0 into master Oct 19, 2018
@maicki maicki deleted the MSFixStdAtomicImport branch October 27, 2018 00:21
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.

None yet

2 participants