Atomic-fake.h File Reference


Detailed Description

This file defines the atomic routines in a known to be unsafe manner, i.e.

by simply performing the operation with no synchronization. The rationale for this implementation is to be used to validate testing frameworks -- i.e. tests should fail if they use this implementation instead of the real atomic implementation.

Definition in file Atomic-fake.h.

#include "../debug/DebugUtils.h"
#include "../util/Singleton.h"

Go to the source code of this file.

Namespaces

namespace  oasys

Classes

struct  oasys::atomic_t
 The definition of atomic_t for arm requires a second word used for the lock, since the only instruction we have to rely on is SWP. More...

Functions

static u_int32_t oasys::atomic_cmpxchg32 (volatile atomic_t *v, u_int32_t o, u_int32_t n)
 Atomic compare and set.
static u_int32_t oasys::atomic_add_ret (volatile atomic_t *v, u_int32_t i)
 Atomic addition function.
static void oasys::atomic_add (volatile atomic_t *v, u_int32_t i)
 Atomic addition function.
static void oasys::atomic_sub (volatile atomic_t *v, u_int32_t i)
 Atomic subtraction function.
static void oasys::atomic_incr (volatile atomic_t *v)
 Atomic increment.
static void oasys::atomic_decr (volatile atomic_t *v)
 Atomic decrement.
static bool oasys::atomic_decr_test (volatile atomic_t *v)
 Atomic decrement and test.
static u_int32_t oasys::atomic_incr_ret (volatile atomic_t *v)
 Atomic increment function that returns the new value.


Generated on Sat Sep 8 08:43:36 2007 for DTN Reference Implementation by  doxygen 1.5.3