GNU Radio 3.3.0 C++ API
atomic.h File Reference
#include <ppu_intrinsics.h>
#include "sync_utils.h"
Include dependency graph for ppu_source/atomic.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef unsigned int atomic_t __attribute__ ((aligned(128)))
typedef unsigned long long atomic_ea_t

Functions

static __inline int _atomic_replace (atomic_ea_t v, int val)
static __inline int _atomic_modify (atomic_ea_t v, int val)

Typedef Documentation

typedef unsigned int atomic_t __attribute__((aligned(128)))
typedef unsigned long long atomic_ea_t

Function Documentation

static __inline int _atomic_replace ( atomic_ea_t  v,
int  val 
) [static]

ASSUMPTIONS: On the PPE, the size of a reservation granule is 128 bytes (a cache-line), so when a programmer puts a reservation on an address, that whole cacheline is reserved. Therefore both the PPE and SPE can participate in an atomic operation as long as lwarx and getllar operate on the same cacheline.

References SYNC_ULL_TO_PTR.

Referenced by _atomic_set(), and _mutex_unlock().