Pyrogenesis  trunk
Functions
e2k.cpp File Reference
#include "precompiled.h"
#include "lib/sysdep/cpu.h"
Include dependency graph for e2k.cpp:

Functions

intptr_t cpu_AtomicAdd (volatile intptr_t *location, intptr_t increment)
 Routines specific to E2K (MCST Elbrus 2000) More...
 
bool cpu_CAS (volatile intptr_t *location, intptr_t expected, intptr_t newValue)
 atomic "compare and swap". More...
 
bool cpu_CAS64 (volatile i64 *location, i64 expected, i64 newValue)
 
const char * cpu_IdentifierString ()
 

Function Documentation

◆ cpu_AtomicAdd()

intptr_t cpu_AtomicAdd ( volatile intptr_t *  location,
intptr_t  increment 
)

Routines specific to E2K (MCST Elbrus 2000)

add a signed value to a variable without the possibility of interference from other threads/CPUs.

◆ cpu_CAS()

bool cpu_CAS ( volatile intptr_t *  location,
intptr_t  expected,
intptr_t  newValue 
)

atomic "compare and swap".

Parameters
locationaddress of the word to compare and possibly overwrite
expectedits expected value
newValuethe value with which to replace it
Returns
false if the target word doesn't match the expected value, otherwise true (also overwriting the contents of location)

◆ cpu_CAS64()

bool cpu_CAS64 ( volatile i64 location,
i64  expected,
i64  newValue 
)

◆ cpu_IdentifierString()

const char* cpu_IdentifierString ( )
Returns
string identifying the CPU (usually a cleaned-up version of the brand string)