-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Implementation of std::atomic::wait #593
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
Merged
Merged
Changes from all commits
Commits
Show all changes
321 commits
Select commit
Hold shift + click to select a range
8d85f70
Don't initialize spin count each time
AlexGuteniev c26e5b4
Feature macro
AlexGuteniev 1d88b03
Satellite DLL fix
AlexGuteniev 72fda00
Satellite DLL fix
AlexGuteniev 246fe9f
test for atomic wait
AlexGuteniev 863669b
test for atomic wait
AlexGuteniev 74c709a
clang format
AlexGuteniev e5f8146
newline
AlexGuteniev 64e1287
Remove fallback from Win8+ build
AlexGuteniev a8cf481
[[maybe_unused]]
AlexGuteniev 0603fdf
Spinning for indirect wait
AlexGuteniev 9be76a5
Flow control braces, explain added spin
AlexGuteniev 0b5cc74
chance not to inline _Atomic_init_spin_count
AlexGuteniev 47457fd
Move addressof out of loop
AlexGuteniev a25fea3
Clearer phase names
AlexGuteniev 040bcc8
Optimize spinning.
AlexGuteniev 9472e4a
Lower bits to wait phases that bounded with ABI
AlexGuteniev 16d481b
make sure we don't spin for native direct waits
AlexGuteniev f7e852e
don't get spin count for native direct waits
AlexGuteniev 1c57f0b
phase not even needed for direct waits
AlexGuteniev 93400c5
Fix lost wake on indirect wait
AlexGuteniev 234f7af
x86 build
AlexGuteniev 5fd3372
x86 build
AlexGuteniev 4964fe2
distinguish counter and SRW Lock phases
AlexGuteniev f49fa21
fix memory model issue
AlexGuteniev 7479840
Lock-free tracking of sequence
AlexGuteniev d5cbe83
the STL is _Ugly
AlexGuteniev 30ff8e4
yvals.h macro instead of constexpr
AlexGuteniev 7ff6da0
Condition for unsigned + clang-format
AlexGuteniev b6f062b
SATELLITE_3 has a name
AlexGuteniev 63a69ed
SATELLITE_3 has a name
AlexGuteniev 8fb9e4f
trim space
AlexGuteniev f4e9bdd
Merge remote-tracking branch 'upstream/master'
AlexGuteniev a54b273
_WIN32_WINNT is too fragile, let's avoid
AlexGuteniev 940f03a
missing break
AlexGuteniev 0c8fe75
clarify _Wait_context being used even for _Is_direct
AlexGuteniev 7738caa
Lost wake prevention
AlexGuteniev 45ce1af
Import/export via .def file
AlexGuteniev 762b7c8
clang format
AlexGuteniev 58ed81e
.def whitespace
AlexGuteniev 075bf51
spelling
AlexGuteniev bee07b9
Merge remote-tracking branch 'origin/master'
AlexGuteniev 23309b7
Merge branch 'master' of https://github.com/AlexGutenev/STL
AlexGuteniev a43e14c
Merge remote-tracking branch 'upstream/master'
AlexGuteniev bbf6283
Merge branch 'master' of https://github.com/AlexGutenev/STL
AlexGuteniev 20ddecf
Merge remote-tracking branch 'upstream/master'
AlexGuteniev 03707c7
Merge branch 'master' into master
cbezault 5c72904
Merge remote-tracking branch 'upstream/master'
AlexGuteniev 50d8d39
Merge branch 'master' of https://github.com/AlexGutenev/STL
AlexGuteniev 24d1cf9
clang format
AlexGuteniev 7cf30f3
clang format
AlexGuteniev bbf210e
whitespace
AlexGuteniev fd034a7
Missing / incorrect / #if _HAS_CXX20
AlexGuteniev c2bda90
warning signed / unsigned
AlexGuteniev 541b7fb
Update stl/inc/atomic
AlexGuteniev 2e5e169
Update stl/src/atomic_wait.cpp
AlexGuteniev c12fcf3
Merge remote-tracking branch 'upstream/master'
AlexGuteniev 184abde
Merge branch 'master' of https://github.com/AlexGutenev/STL
AlexGuteniev c7302b5
preprocessor macro test
AlexGuteniev 8e4fc45
minor review comments
AlexGuteniev bc5eb04
put back this top level const
AlexGuteniev 5246edc
constant test
AlexGuteniev 0e2eb5e
clang format
AlexGuteniev 681e564
clang format
AlexGuteniev d0ef8a6
Remove parts extracted to #684
AlexGuteniev 99b5df0
more std::size_t
AlexGuteniev f1bc31b
Correct captialization of synch module
AlexGuteniev 64eb2c1
explicit unicode string
AlexGuteniev cd75554
msbuild update #689
AlexGuteniev dc60ff8
Revert "msbuild update #689"
AlexGuteniev 49342fd
Merge remote-tracking branch 'upstream/master'
AlexGuteniev 8661d67
delete statically unavailable functions
AlexGuteniev 1dbdbbd
put back const removed by mistake
AlexGuteniev f44c349
delete top level const
AlexGuteniev 8ca4153
= delete does not work unfortunately
AlexGuteniev 88d5970
second taking on statically deleting fallback
AlexGuteniev 8a3ac3a
= delete does not work even with constexpr if
AlexGuteniev f1601c7
Move _Expected cast out of loop (debug mode perf)
AlexGuteniev 4c17011
Merge remote-tracking branch 'origin/master' into HEAD
BillyONeal d4b0fc2
Add wait/notify_one to atomic<shared_ptr<T>> and atomic<weak_ptr<T>>.
BillyONeal f1a8760
Removing macros, now I have ICE
AlexGuteniev 5f4a523
Merge branch 'master' of https://github.com/AlexGutenev/STL
AlexGuteniev 2983588
Revert "Removing macros, now I have ICE"
AlexGuteniev b35717e
clang format
AlexGuteniev af591a2
Avoid waiting on unlocked
AlexGuteniev 4fe13ae
clang format
AlexGuteniev e1758d9
Merge remote-tracking branch 'upstream/master'
AlexGuteniev 31b9785
Provision for timed wait for timed primitives
AlexGuteniev 3e91fba
Timed wait: unwait on timeout path
AlexGuteniev 83a973d
fix ARM build
AlexGuteniev c6fa8aa
[[fallthough]] guard
AlexGuteniev cb352d0
Preparations for internal re-use
AlexGuteniev 29ff60c
clang format
AlexGuteniev b2ef4ab
spinlock flavor of wait, solves #370
AlexGuteniev 9a1ba8f
clang format
AlexGuteniev 1e875cb
fix ARM build
AlexGuteniev 8fc931e
revert ODR breaking part of spinlock enhancement
AlexGuteniev ee7b664
Fixes #598
AlexGuteniev 7bddb91
forgot to remove this
AlexGuteniev 4c320b4
get back __std_execution_wake_by_address_all
AlexGuteniev 5714886
unwait in parallel_algorithms.cpp
AlexGuteniev 80203b5
unwait in parallel_algorithms.cpp
AlexGuteniev 0fa17f7
paranoid on magic static avoidance
AlexGuteniev 50a5b3e
avoid dead code path fallback
AlexGuteniev f2256d9
downlevel OS testing
AlexGuteniev 83b7066
newlines
AlexGuteniev 1309b30
fix ARM build, fix __std_atomic_set_api_level robustness
AlexGuteniev 2078793
reduce waiting time to avoid tests to time out
AlexGuteniev 55c2737
Fix exponential sleep growth
AlexGuteniev efc2319
Delete XP test as XP wait is not precise anyway
AlexGuteniev 5e2345d
clang format
AlexGuteniev 9951b78
Return XP test. Let's just call XP impl "imprecise
AlexGuteniev 5f68da4
fix condition
AlexGuteniev fb0dc41
ARM build
AlexGuteniev 3703452
clang format
AlexGuteniev 265b025
still remove XP test
AlexGuteniev cb79063
add check for duration to see chick case fails
AlexGuteniev f1d91f1
Get back XP tests, reduce waiting duration more
AlexGuteniev ededc48
parallel test run
AlexGuteniev c3fc4d5
clang format
AlexGuteniev 9d8eb82
Fix test failure
AlexGuteniev fe4d19d
Avoid spinning on ARM properly
AlexGuteniev 408836f
Spinlock unwait in the right place
AlexGuteniev 6611620
Revert "parallel test run"
AlexGuteniev 74a45ef
Don't test duration,
AlexGuteniev b98b0ac
Merge remote-tracking branch 'upstream/master'
AlexGuteniev e3cde08
remove atomic wait workaround
AlexGuteniev 20cafc0
time precision for potential future extension
AlexGuteniev a4d71e8
revert changes to atomic spinlock, can do separately
AlexGuteniev 88adaf5
clang format
AlexGuteniev 6aec891
fix build
AlexGuteniev bd88a37
atomic_shared_ptr lock backed by atomic wait
AlexGuteniev bb54241
whitespace
AlexGuteniev 61cb5b9
reload after wait!
AlexGuteniev c186cc9
Operator precedence, relaxed order, redundant yield
AlexGuteniev b0866ef
Fix expectation for last case
AlexGuteniev b9113b6
`notify_all` to prevent deadlock with many waiters
AlexGuteniev 54a5831
clang format
AlexGuteniev 39124da
Merge remote-tracking branch 'upstream/master'
AlexGuteniev faa61e0
no .def file, forwarders, fix makefile
AlexGuteniev cd2c966
It's reverse
AlexGuteniev bdb1675
Optimize fences
AlexGuteniev d3eac91
Merge remote-tracking branch 'upstream/master'
AlexGuteniev cb93f7c
build fix
AlexGuteniev 1b78fae
pragma linker has problems on x86
AlexGuteniev 29a569f
explicit parentheses to fix build warning
AlexGuteniev d1c5ae3
explicit parentheses to fix build warning
AlexGuteniev 75567a9
This is wrong, extra barrier is not helpful.
AlexGuteniev 3cbb774
drop XP support in import library
AlexGuteniev be86c90
Formatting
AlexGuteniev 57f15ca
ARM build
AlexGuteniev ca11289
Merge remote-tracking branch 'upstream/master'
AlexGuteniev cbb2803
I expect it to pass
AlexGuteniev f2f01a1
Don't try to support nonexistent "old ABI"
AlexGuteniev 7b4a03a
formatting
AlexGuteniev 9acff2e
Update stl/inc/xatomic_wait.h
AlexGuteniev 7069749
Update stl/inc/xatomic_wait.h
AlexGuteniev 380c281
Update stl/inc/memory
AlexGuteniev 073f30b
Update stl/inc/atomic
AlexGuteniev 9c5cb7e
correctly mark test as passing
AlexGuteniev e9969c1
duplicate duplicate
AlexGuteniev 237f535
Merge branch 'master' of https://github.com/AlexGuteniev/STL
AlexGuteniev 750356b
abort on unexpected situation even in release
AlexGuteniev 0f89af1
actually don't see a value in this check
AlexGuteniev 84d32f0
too much mimic of existing code by too much copying
AlexGuteniev 2dbcf8e
Merge remote-tracking branch 'upstream/master'
AlexGuteniev 53f056f
Merge remote-tracking branch 'upstream/master'
AlexGuteniev edff7ca
More time to pass test
AlexGuteniev f8f9abe
Merge remote-tracking branch 'upstream/master'
AlexGuteniev 9ca6c15
Merge remote-tracking branch 'upstream/master'
AlexGuteniev 4287866
Merge remote-tracking branch 'origin/master' into HEAD
BillyONeal f34dee5
Merge remote-tracking branch 'origin/master' into atomic_wait
BillyONeal 05a65fa
Add msbuild build system.
BillyONeal e46c447
Manually inline _Save_function_pointer_relaxed -- I think atomic ops …
BillyONeal 7f05ee2
More build fixes discovered in DevDiv test harness
BillyONeal 4dcd154
Merge remote-tracking branch 'origin/master' into atomic_wait
BillyONeal 9dcb98e
clang-format
BillyONeal 83290f4
Fix cmake dependency information for the .src, thanks to Robert Schum…
BillyONeal f8e6cea
_Ugly some things in atomic_wait.cpp
BillyONeal 4c454e7
Merge _Atomic_wait_direct_timed_for_internal_spinlock into only caller.
BillyONeal 6e3951d
de-inline template
BillyONeal e80bbc6
Remove synchronization.lib pragma which is problematic for _ONECORE p…
BillyONeal bb15189
Rename _Deadline_picoseconds to _Reserved as it is currently unused.
BillyONeal 84df7ef
Rename _Get_remaining_waiting_time to _Get_remaining_wait_millisecond…
BillyONeal 653c270
Merge remote-tracking branch 'origin/master' into atomic_wait
BillyONeal f866822
fixup
BillyONeal e8b38a1
Add missing _INLINE_VAR.
BillyONeal c8f10c6
Merge remote-tracking branch 'upstream/master'
AlexGuteniev f3ffdaf
Merge remote-tracking branch 'origin/master'
AlexGuteniev 8fa9d54
Update stl/inc/atomic
AlexGuteniev 21b0352
Update stl/inc/memory
AlexGuteniev c3aa7e1
Fix CMakeLists.txt declaration order.
BillyONeal eb99cd0
Fix test sort order.
BillyONeal 0b0de84
Use <assert.h> and pragma once.
BillyONeal 74ab22a
STL CR feedback:
BillyONeal aaf8f46
Merge remote-tracking branch 'AlexGuteniev/master' into atomic_wait
BillyONeal 0334bda
Compiler errors.
BillyONeal c281047
Fix the same build system bug in the cmake version.
BillyONeal 7565517
Find missing ^^^s with regex:
BillyONeal bdeb5ad
Bill forgot to save before committing.
BillyONeal dcf4216
remove spinner to pass tests
AlexGuteniev 1caf417
Correct default for wait phase
AlexGuteniev 71d5d1b
whitespace
AlexGuteniev 54c2eda
rewrite to avoid the complexity of indirect wait
AlexGuteniev ba3d8c8
clang format
AlexGuteniev c1157f7
notify_one for indirect wake
AlexGuteniev 7327523
clang format
AlexGuteniev fed4f21
optimize acquire wait functions
AlexGuteniev 8aab61e
Merge remote-tracking branch 'upstream/master'
AlexGuteniev f5d945e
remove unwait
AlexGuteniev 21a395c
All. Sorry we don't track waiter count.
AlexGuteniev 94f2f87
actually one, we don't track the waiting too
AlexGuteniev 6d78db0
no wheel invention actually
AlexGuteniev b893242
}
AlexGuteniev b627266
whitespace
AlexGuteniev cebacd5
Merge remote-tracking branch 'upstream/master'
AlexGuteniev c5cb0b9
apply padding bits resolution
AlexGuteniev 18e5184
attempt on 16 bytes case
AlexGuteniev 6726c5d
attempt on 16 bytes case
AlexGuteniev 1b4be08
clang format
AlexGuteniev fe33a36
attempt on 16 bytes case
AlexGuteniev 73c5cc6
Add test for discovered notify_all_indirect deadlock.
BillyONeal 1244e9c
Fix deadlock in notify_all.
BillyONeal c55368f
Add RAII guards.
BillyONeal b308261
Remove timed variants from header; timed infrastructure on the other …
BillyONeal c326f7f
Use return instead of break in the indirect mode.
BillyONeal 66a2e6e
Add comments explaining the ABI layer to <xatomic_wait.h> and remove …
BillyONeal 7edc9f6
Merge pull request #5 from BillyONeal/atomic_upstream
AlexGuteniev 6279b7b
Document deliberately waking before SRWLOCK exit
AlexGuteniev de50735
Direct wait to API convention for aliasobj
AlexGuteniev ba5364d
Some respect to padding bits
AlexGuteniev b9acf63
clang format
AlexGuteniev 3be75d0
Avoid killing correct pad bits of observed value
AlexGuteniev 3ac6b7b
Minor improvements
AlexGuteniev 50b6861
clang format
AlexGuteniev 4d764eb
no loop needed here, caller handles spurious wakes
AlexGuteniev 9a8de74
STL CR comments.
BillyONeal 2bfa19a
fix `memcmp` race
AlexGuteniev 5471aad
optimize: check before waiting
AlexGuteniev 4266db1
newlines
AlexGuteniev 20356ed
Let's implement this in scope of atomic_ref
AlexGuteniev fbb3d11
clang format
AlexGuteniev df57ccd
don't need this if statically available
AlexGuteniev 7f57f6a
STL review: remove wrong const, add noexcept
AlexGuteniev fa295ec
tests complain
AlexGuteniev 45b0923
Merge remote-tracking branch 'origin/master' into HEAD
BillyONeal 0968ed2
* Fix timeouts correctness bug wherein we would blow up the timeout o…
BillyONeal b4478b7
Add perf improvement special case for no timeout to reduce the number…
BillyONeal a832e67
Apply Stephan and Casey code review fixes.
BillyONeal c9f9f4d
Remove const from unnamed function parameter
CaseyCarter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.