dxd - dynax driver framework 2.6.0d221
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::circular::fence Struct Reference

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>

Public Member Functions

 fence ()
 ~fence ()

Detailed Description

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.

Constructor & Destructor Documentation

◆ fence()

dx::circular::fence::fence ( )
inline

◆ ~fence()

dx::circular::fence::~fence ( )
inline

The documentation for this struct was generated from the following file:

(c) copyright 2009 dynamic acoustics e.U. generated on

a closed source license may be obtained by requesting a written permission from dynamic acoustics e.U.
however - governmental use generally and military use especially is strictly prohibited though.