RAII acquire/release fence bracketing the tx/rx handshake below: acquire on construction, release on destruction, payload access in between. tx/rx stay plain volatile (not std::atomic<>) because this struct is shared byte-for-byte across the app/kernel boundary; the fences give the missing ordering guarantee on weakly-ordered CPUs (Apple Silicon, Windows ARM64) without changing the struct layout.
More...
#include <dx_circular.h>
RAII acquire/release fence bracketing the tx/rx handshake below: acquire on construction, release on destruction, payload access in between. tx/rx stay plain volatile (not std::atomic<>) because this struct is shared byte-for-byte across the app/kernel boundary; the fences give the missing ordering guarantee on weakly-ordered CPUs (Apple Silicon, Windows ARM64) without changing the struct layout.
- Todo
- provisional placement: nested here for now. The DX_KERNEL branch below arguably belongs as a shared dxd::fence in kernel/dxd_sync.h (with the KeMemoryBarrier()/__atomic_thread_fence bodies split into kernel/wdk/dxd_sync_platform.h and kernel/iokit/dxd_sync_platform.h, mirroring how atomic<>/__atomic_scalar is already split there) – but interface/ must not depend on kernel/, so that move needs a dependency-direction rethink first.
◆ fence()
| dx::circular::fence::fence |
( |
| ) |
|
|
inline |
◆ ~fence()
| dx::circular::fence::~fence |
( |
| ) |
|
|
inline |
The documentation for this struct was generated from the following file: