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

the memory ordering plain shared state needs on weakly ordered CPUs, in user mode and the kernel alike More...

#include <dx_fence.h>

Public Member Functions

 fence ()
 ~fence ()

Static Public Member Functions

static void acquire ()
static void release ()

Detailed Description

the memory ordering plain shared state needs on weakly ordered CPUs, in user mode and the kernel alike

State shared byte for byte across threads and the app/kernel boundary stays plain volatile - a ring's tx/rx cursors, a device's stream slots, a pipe's ticking flag - since std::atomic<> would change its layout. release() orders every store before it ahead of a store after it, so a writer publishes a pointer or cursor after the data it names; acquire() orders every load after it behind a load before it, so a reader that took the pointer or cursor sees that data. The object brackets a handshake: acquire on construction, release on destruction, the publishing store past its scope.

Constructor & Destructor Documentation

◆ fence()

dx::fence::fence ( )
inline
Here is the call graph for this function:

◆ ~fence()

dx::fence::~fence ( )
inline
Here is the call graph for this function:

Member Function Documentation

◆ acquire()

void dx::fence::acquire ( )
inlinestatic
Here is the caller graph for this function:

◆ release()

void dx::fence::release ( )
inlinestatic
Here is the caller graph for this function:

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.