Skip to content

Class Ase::AtomicIntrusiveStack

template <class T>

ClassList > Ase > AtomicIntrusiveStack

More...

  • #include <atomics.hh>

Public Functions

Type Name
AtomicIntrusiveStack ()
bool empty () const
Check if poppingreturns null.
T * pop_all ()
T * pop_reversed ()
bool push (T * el)
Atomically push el onto the stack, returnswas_empty .
bool push_chain (T * first, T * last)
Atomically push linked nodes first->…->last onto the stack, returnswas_empty .

Detailed Description

Lock-free stack with atomic push() and pop_all operations. Relies on unqualified calls to atomic<T*>& atomic_next_ptrref(T*).

Public Functions Documentation

function AtomicIntrusiveStack

inline Ase::AtomicIntrusiveStack::AtomicIntrusiveStack () 

function empty

inline bool Ase::AtomicIntrusiveStack::empty () const

function pop_all

inline T * Ase::AtomicIntrusiveStack::pop_all () 

Atomically pop all elements from the stack in LIFO order. Use atomic_next_ptrref() for iteration.


function pop_reversed

inline T * Ase::AtomicIntrusiveStack::pop_reversed () 

Atomically pop all elements from the stack in FIFO order. Use atomic_next_ptrref() for iteration.


function push

inline bool Ase::AtomicIntrusiveStack::push (
    T * el
) 

function push_chain

inline bool Ase::AtomicIntrusiveStack::push_chain (
    T * first,
    T * last
) 


The documentation for this class was generated from the following file /__w/anklang/anklang/ase/atomics.hh