Hui
1f613bce19
[libc++] refactor cxx_atomic_wait
to make it reusable for atomic_ref ( #81427 )
...
The goal of this patch is to make `atomic`'s wait functions to be
reusable by `atomic_ref`.
https://github.com/llvm/llvm-project/pull/76647
First, this patch is built on top of
https://github.com/llvm/llvm-project/pull/80596 , to reduce the future
merge conflicts.
This patch made the following functions as "API"s to be used by
`atomic`, `atomic_flag`, `semaphore`, `latch`, `atomic_ref`
```
__atomic_wait
__atomic_wait_unless
__atomic_notify_one
__atomic_notify_all
```
These functions are made generic to support `atomic` type and
`atomic_ref`. There are two customisation points.
```
// How to load the value from the given type (with a memory order)
__atomic_load
```
```
// what is the contention address that the platform `wait` function is going to monitor
__atomic_contention_address
```
For `atomic_ref` (not implemented in this patch), the `load` and
`address` function will be different, because
- it does not use the "atomic abstraction layer" so the `load` operation
will be some gcc builtin
- the contention address will be the user's actual type that the
`atomic_ref` is pointing to
2024-03-02 14:50:52 +00:00
..
2024-02-20 01:47:38 +01:00
2024-03-02 14:50:52 +00:00
2024-01-20 23:38:02 -08:00
2024-02-29 10:12:22 -05:00
2024-02-17 14:28:01 +01:00
2024-02-08 19:23:10 +01:00
2024-01-15 00:00:57 +02:00
2024-01-30 08:35:15 -05:00
2024-01-22 18:12:58 -08:00
2024-01-22 23:31:58 -08:00
2024-01-22 10:12:41 -05:00
2024-01-22 09:05:39 -05:00
2024-01-25 15:48:46 -05:00
2024-02-29 10:12:22 -05:00
2024-02-20 01:47:38 +01:00
2024-02-19 09:56:06 +02:00
2023-12-18 14:01:33 -05:00
2024-02-20 01:47:38 +01:00
2024-02-11 19:43:34 +01:00
2023-12-10 11:52:14 +01:00
2024-02-20 01:47:38 +01:00
2024-01-22 18:12:58 -08:00
2024-01-30 08:35:15 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-05 12:04:07 -05:00
2024-01-26 22:08:36 +01:00
2024-02-28 21:14:35 +01:00
2024-02-19 09:56:06 +02:00
2024-02-26 12:04:41 +01:00
2024-02-28 20:33:20 +01:00
2023-12-18 14:01:33 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-26 14:34:43 -05:00
2024-02-05 17:41:12 +01:00
2024-02-29 10:12:22 -05:00
2023-12-13 06:05:34 +01:00
2024-02-20 01:47:38 +01:00
2024-02-03 20:50:06 +01:00
2023-12-18 14:01:33 -05:00
2023-12-18 14:01:33 -05:00
2023-12-18 14:01:33 -05:00
2023-11-27 10:54:35 -05:00
2024-02-20 01:47:38 +01:00
2023-12-18 14:01:33 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-19 09:56:06 +02:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2023-12-18 14:01:33 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2023-12-18 14:01:33 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2023-12-18 14:01:33 -05:00
2024-02-29 10:12:22 -05:00
2023-12-18 14:01:33 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2023-12-18 14:01:33 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-03-02 14:50:52 +00:00
2024-02-29 10:48:23 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2023-12-18 14:01:33 -05:00
2024-02-29 10:12:22 -05:00
2023-12-18 14:01:33 -05:00
2023-12-10 11:52:14 +01:00
2024-02-29 10:12:22 -05:00
2024-02-19 09:56:06 +02:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-03-02 14:50:52 +00:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2023-12-06 09:04:06 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2023-12-18 14:01:33 -05:00
2023-12-18 14:01:33 -05:00
2023-12-18 14:01:33 -05:00
2024-02-29 10:12:22 -05:00
2023-12-18 14:01:33 -05:00
2023-12-18 14:01:33 -05:00
2023-12-18 14:01:33 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2023-12-18 14:01:33 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2023-12-18 14:01:33 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 10:12:22 -05:00
2024-02-29 16:06:32 -08:00
2023-12-18 14:01:33 -05:00
2023-12-18 14:01:33 -05:00