Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
<mutex>
: Make_Mtx_internal_imp_mirror
more closely match_Mtx_internal_imp_t
#3763<mutex>
: Make_Mtx_internal_imp_mirror
more closely match_Mtx_internal_imp_t
#3763Changes from 2 commits
4ea132c
8c339e1
e3fcbba
6f1a6f6
f1fc626
bc8714b
536d5a3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
No change requested, note to other reviewers: I know this looks really really scary, but I believe it's a good change. This doesn't control the layout, it's just trying to mirror it (hence the name) so the header can directly access
_Count
. We are now mirroring it exactly:STL/stl/src/mutex.cpp
Lines 39 to 48 in c8d1efb
The header doesn't care about the details of what's stored within the aligned storage, so we don't need to separately describe the vptr and the class data members within. (This also permits further refactoring as described in the PR comments, but it's a good simplification even aside from that.)
The other simplification is that we can now mention the same "size" as
primitives.hpp
does, which includes the vptr. This avoids having the numbers all be different by 4 bytes for 32-bit and 8 bytes for 64-bit.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.
No change requested, note to other reviewers: I know this looks really scary too, but we had already messed up UWP as @cpplearner verified in #3763 (comment) . This PR fixes things. Note that
stl/inc
's idea of the necessary size is not changing, so user-compiled code remains binary-compatible. What's happening is that the separately compiled STL DLL/LIB is now performing layout for UWP that matches what the headers expected.The actual layout mostly didn't matter, because the interface is a flat C API, except for two things:
MEOW_vista
size consumed to the largerMEOW_concrt
size which exactly matches the header, and_Count
needs to match, which it does after this PR.