Atomic integer class for ix86 CPUs. More...
#include <rutz/atomic_ix86.h>
Public Member Functions | |
ix86_atomic_int () | |
Construct with an initial value of 0. | |
int | atomic_get () const |
Get the current value. | |
void | atomic_set (int v) |
Set value to the given value v. | |
void | atomic_add (int i) |
Add v to the value. | |
void | atomic_sub (int i) |
Subtract v from the value. | |
bool | atomic_sub_test_zero (int i) |
Subtract v from the value; return true if the new value is zero. | |
void | atomic_incr () |
Increment the value by one. | |
void | atomic_decr () |
Decrement the value by one. | |
bool | atomic_decr_test_zero () |
Decrement the value by one; return true if the new value is zero. | |
bool | atomic_incr_test_zero () |
Increment the value by one; return true if the new value is zero. | |
int | atomic_add_return (int i) |
Add v to the value and return the new value. | |
int | atomic_sub_return (int i) |
Subtract v from the value and return the new value. | |
int | atomic_incr_return () |
Increment the value by one and return the new value. | |
int | atomic_decr_return () |
Decrement the value by one and return the new value. | |
Static Public Member Functions | |
static int | max_value () |
Get the maximum representable value. |
Atomic integer class for ix86 CPUs.
Definition at line 189 of file atomic_ix86.h.
rutz::ix86_atomic_int::ix86_atomic_int | ( | ) | [inline] |
Construct with an initial value of 0.
Definition at line 199 of file atomic_ix86.h.
References atomic_set().
void rutz::ix86_atomic_int::atomic_add | ( | int | i | ) | [inline] |
Add v to the value.
Definition at line 213 of file atomic_ix86.h.
References rutz::ix86_atomic_add().
int rutz::ix86_atomic_int::atomic_add_return | ( | int | i | ) | [inline] |
Add v to the value and return the new value.
Definition at line 241 of file atomic_ix86.h.
References rutz::ix86_atomic_add_return().
void rutz::ix86_atomic_int::atomic_decr | ( | ) | [inline] |
Decrement the value by one.
Definition at line 229 of file atomic_ix86.h.
References rutz::ix86_atomic_dec().
int rutz::ix86_atomic_int::atomic_decr_return | ( | ) | [inline] |
Decrement the value by one and return the new value.
Definition at line 253 of file atomic_ix86.h.
References rutz::ix86_atomic_add_return().
Referenced by BufferedInputFrameSeries::get(), and BufferedFrameIstream::readFrame().
bool rutz::ix86_atomic_int::atomic_decr_test_zero | ( | ) | [inline] |
Decrement the value by one; return true if the new value is zero.
Definition at line 233 of file atomic_ix86.h.
References rutz::ix86_atomic_dec_and_test().
Referenced by rutz::shared_ptr< T >::dyn_cast_from(), ArrayData< T >::release(), rutz::shared_array< T >::~shared_array(), and rutz::shared_ptr< T >::~shared_ptr().
int rutz::ix86_atomic_int::atomic_get | ( | ) | const [inline] |
Get the current value.
Definition at line 205 of file atomic_ix86.h.
References ix86_atomic_read.
Referenced by ArrayData< T >::acquire(), nub::ref_counted::dbg_ref_count(), nub::ref_counted::dbg_weak_ref_count(), BufferedInputFrameSeries::get(), EyeTrackerISCAN::getCalibEyePos(), WorkThreadServer::getNumRun(), nub::ref_counted::is_shared(), ArrayData< T >::isShared(), nub::ref_counted::mark_as_volatile(), BufferedFrameIstream::readFrame(), TCPcommunicator::receiveIt(), ArrayData< T >::refCount(), BufferedFrameIstream::startStream(), TCPcommunicator::stop1(), rutz::shared_ptr< SimStructure >::use_count(), rutz::shared_array< T >::use_count(), and nub::ref_counted::~ref_counted().
void rutz::ix86_atomic_int::atomic_incr | ( | ) | [inline] |
Increment the value by one.
Definition at line 225 of file atomic_ix86.h.
References rutz::ix86_atomic_inc().
Referenced by ArrayData< T >::acquire(), rutz::shared_ptr< T >::dyn_cast_from(), rutz::shared_array< T >::shared_array(), and rutz::shared_ptr< T >::shared_ptr().
int rutz::ix86_atomic_int::atomic_incr_return | ( | ) | [inline] |
Increment the value by one and return the new value.
Definition at line 249 of file atomic_ix86.h.
References rutz::ix86_atomic_add_return().
bool rutz::ix86_atomic_int::atomic_incr_test_zero | ( | ) | [inline] |
Increment the value by one; return true if the new value is zero.
Definition at line 237 of file atomic_ix86.h.
References rutz::ix86_atomic_inc_and_test().
void rutz::ix86_atomic_int::atomic_set | ( | int | v | ) | [inline] |
Set value to the given value v.
Definition at line 209 of file atomic_ix86.h.
References ix86_atomic_set.
Referenced by ArrayData< T >::ArrayData(), rutz::shared_ptr< T >::dyn_cast_from(), ix86_atomic_int(), TCPcommunicator::run(), XWinManaged::setTraceEvents(), rutz::shared_array< T >::shared_array(), rutz::shared_ptr< T >::shared_ptr(), TCPcommunicator::start2(), TCPcommunicator::TCPcommunicator(), WorkThreadServer::WorkThreadServer(), and XWinManaged::~XWinManaged().
void rutz::ix86_atomic_int::atomic_sub | ( | int | i | ) | [inline] |
Subtract v from the value.
Definition at line 217 of file atomic_ix86.h.
References rutz::ix86_atomic_sub().
int rutz::ix86_atomic_int::atomic_sub_return | ( | int | i | ) | [inline] |
Subtract v from the value and return the new value.
Definition at line 245 of file atomic_ix86.h.
bool rutz::ix86_atomic_int::atomic_sub_test_zero | ( | int | i | ) | [inline] |
Subtract v from the value; return true if the new value is zero.
Definition at line 221 of file atomic_ix86.h.
References rutz::ix86_atomic_sub_and_test().
static int rutz::ix86_atomic_int::max_value | ( | ) | [inline, static] |
Get the maximum representable value.
Definition at line 202 of file atomic_ix86.h.