-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[libc++] Refactor the predicate taking variant of __cxx_atomic_wait
#80596
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
Changes from all commits
8e34214
ce27d09
6f39049
0866001
5541162
f151e17
2daeb53
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -178,6 +178,7 @@ _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(__cxx_atomic_contention_t | |
_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(__cxx_atomic_contention_t const volatile* __location) { | ||
__libcpp_contention_notify(&__libcpp_contention_state(__location)->__contention_state, __location, false); | ||
} | ||
// This function is never used, but still exported for ABI compatibility. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this because this is handled by There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, exactly. This overload of
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And now, |
||
_LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t | ||
__libcpp_atomic_monitor(__cxx_atomic_contention_t const volatile* __location) { | ||
return __libcpp_contention_monitor_for_wait(&__libcpp_contention_state(__location)->__contention_state, __location); | ||
|
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.
IIUC, this is roughly what @huixie90 is transforming into a CPO in #81427 .
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.
Yes, the two
__poll_or_get_monitor
functions here are basically the same thing as the two__update_monitor_val_and_poll
functions from #81427 (here).