Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Atomic Operations
[Intel IA32 (32-bit) Architecture]

Collaboration diagram for Atomic Operations:


Detailed Description

This module contains inline functions providing some basic atomic (non-interruptible) operation which can be used to build higher-level serialization constructs.

All zygoma ports MUST provide these functions.


Typedefs

typedef int Zygoma::ia32::AtomicWord
 A platform-specific atomically-addressable value.

Functions

AtomicWord Zygoma::ia32::atomicExchange (volatile AtomicWord *mem, int value)
 Atomically exchanges the value found at "mem" with the value passed in as "value," returns the original value found at "mem".
AtomicWord Zygoma::ia32::atomicExchangeAndAdd (volatile AtomicWord *mem, int value)
 Atomically sets the value at "mem" to "value," returns the sum of "value" and the value originally found at "mem".
void Zygoma::ia32::atomicAdd (volatile AtomicWord *mem, int value)
 Atomically adds "value" to the value stored at "mem," stores result at "mem.


Typedef Documentation

typedef int Zygoma::ia32::AtomicWord
 

A platform-specific atomically-addressable value.

Not all operations on this value are guaranteed to be atomic, but those operations that are atomic work on values of this type.


Function Documentation

void Zygoma::ia32::atomicAdd volatile AtomicWord mem,
int  value
 

Atomically adds "value" to the value stored at "mem," stores result at "mem.

"

Parameters:
mem A pointer to an atomic word in memory.
value A value to be added to the value of the atomic word pointed to by mem.

AtomicWord Zygoma::ia32::atomicExchange volatile AtomicWord mem,
int  value
 

Atomically exchanges the value found at "mem" with the value passed in as "value," returns the original value found at "mem".

Parameters:
mem A pointer to an atomic word in memory.
value A value to be written to the atomic word pointed to by mem.
Returns:
The original value at mem.

AtomicWord Zygoma::ia32::atomicExchangeAndAdd volatile AtomicWord mem,
int  value
 

Atomically sets the value at "mem" to "value," returns the sum of "value" and the value originally found at "mem".

Parameters:
mem A pointer to an atomic word in memory.
value A value to be written to the atomic word pointed to by mem.
Returns:
The original value at mem.


Generated on Fri Sep 2 10:45:03 2005 for zygoma by doxygen 1.4.2