14#ifndef ATOMICADJUSTDUMMYIMPL_H
15#define ATOMICADJUSTDUMMYIMPL_H
30 typedef void *Pointer;
32 ALWAYS_INLINE
static void inc(TVOLATILE Integer &var);
33 ALWAYS_INLINE
static bool dec(TVOLATILE Integer &var);
34 ALWAYS_INLINE
static Integer
add(TVOLATILE Integer &var, Integer delta);
35 ALWAYS_INLINE
static Integer
set(TVOLATILE Integer &var, Integer new_value);
36 ALWAYS_INLINE
static Integer
get(
const TVOLATILE Integer &var);
38 ALWAYS_INLINE
static Pointer
set_ptr(TVOLATILE Pointer &var, Pointer new_value);
39 ALWAYS_INLINE
static Pointer
get_ptr(
const TVOLATILE Pointer &var);
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A trivial implementation for atomic adjustments for systems that don't require multiprogramming,...
static Integer set(Integer &var, Integer new_value)
Atomically changes the indicated variable and returns the original value.
static Integer add(Integer &var, Integer delta)
Atomically computes var += delta.
static bool dec(Integer &var)
Atomically decrements the indicated variable and returns true if the new value is nonzero,...
static Integer compare_and_exchange(Integer &mem, Integer old_value, Integer new_value)
Atomic compare and exchange.
static Pointer set_ptr(Pointer &var, Pointer new_value)
Atomically changes the indicated variable and returns the original value.
static Pointer compare_and_exchange_ptr(Pointer &mem, Pointer old_value, Pointer new_value)
Atomic compare and exchange.
static void inc(Integer &var)
Atomically increments the indicated variable.
static Pointer get_ptr(const Pointer &var)
Atomically retrieves the snapshot value of the indicated variable.
static Integer get(const Integer &var)
Atomically retrieves the snapshot value of the indicated variable.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.