Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions stl/inc/__msvc_threads_core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,12 @@ struct _Stl_critical_section {
};

struct _Mtx_internal_imp_t {
#if defined(_CRT_WINDOWS) || defined(UNDOCKED_WINDOWS_UCRT) // for Windows-internal code
static constexpr size_t _Critical_section_size = 2 * sizeof(void*);
#elif defined(_WIN64) // ordinary 64-bit code
// TRANSITION, ABI: We should directly store _M_srw_lock above.
#ifdef _WIN64
static constexpr size_t _Critical_section_size = 64;
#else // vvv ordinary 32-bit code vvv
#else // ^^^ 64-bit / 32-bit vvv
static constexpr size_t _Critical_section_size = 36;
#endif // ^^^ ordinary 32-bit code ^^^
#endif // ^^^ 32-bit ^^^

int _Type{};
union {
Expand All @@ -60,13 +59,12 @@ struct _Stl_condition_variable {
#pragma warning(push)
#pragma warning(disable : 26495) // Variable 'meow' is uninitialized. Always initialize a member variable (type.6).
struct _Cnd_internal_imp_t {
#if defined(_CRT_WINDOWS) // for Windows-internal code
static constexpr size_t _Cnd_internal_imp_size = 2 * sizeof(void*);
#elif defined(_WIN64) // ordinary 64-bit code
// TRANSITION, ABI: We should directly store _Win_cv above.
#ifdef _WIN64
static constexpr size_t _Cnd_internal_imp_size = 72;
#else // vvv ordinary 32-bit code vvv
#else // ^^^ 64-bit / 32-bit vvv
static constexpr size_t _Cnd_internal_imp_size = 40;
#endif // ^^^ ordinary 32-bit code ^^^
#endif // ^^^ 32-bit ^^^

union {
_Stl_condition_variable _Stl_cv{};
Expand Down