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
2 changes: 2 additions & 0 deletions stl/src/atomic_wait.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ namespace {

#if _ATOMIC_WAIT_ON_ADDRESS_STATICALLY_AVAILABLE

#pragma comment(lib, "synchronization")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I thought we had this comment, but it was replaced with linking using CMakeList.txt.
Billy O'Neal (@BillyONeal) , do you remeber anything relevant to this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The final binary which links against the atomic_wait.obj needs to also know to link in the synchronization.lib. It is insufficient to just link against the synchronization.lib at build time.

@CaseyCarter Casey Carter (CaseyCarter) Dec 1, 2020

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It is insufficient to just link against the synchronization.lib at build time.

Do I understand correctly that this isn't a problem for x86/x64 because _ATOMIC_WAIT_ON_ADDRESS_STATICALLY_AVAILABLE is zero because they have to support Windows 7? (I should have asked this in my review instead of simply assuming.)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, _ATOMIC_WAIT_ON_ADDRESS_STATICALLY_AVAILABLE is zero on x86/x64


#define __crtWaitOnAddress WaitOnAddress
#define __crtWakeByAddressSingle WakeByAddressSingle
#define __crtWakeByAddressAll WakeByAddressAll
Expand Down