Atomic operations
[Portability layer]


Detailed Description

All atomic operations are perfomance critical, thus they are defined as inlined for most platforms in this file.


Functions

uint8 port_atomic_cas8 (volatile uint8 *data, uint8 value, uint8 comp)
 The atomic compare and exchange operation on uint8.
uint16 port_atomic_cas16 (volatile uint16 *data, uint16 value, uint16 comp)
 The atomic compare and exchange operation on uint16.
uint64 port_atomic_cas64 (volatile uint64 *data, uint64 value, uint64 comp)
 The atomic compare and exchange operation on uint64.


Function Documentation

uint8 port_atomic_cas8 ( volatile uint8 *  data,
uint8  value,
uint8  comp 
)

The atomic compare and exchange operation on uint8.

The function compares the current value of the specified data with the comp value and if they match, swaps the data with the value.

Parameters:
[in,out] data - the pointer to the value
[in] value - the new value
[in] comp - the value to compare with
Returns:
The old value.

uint16 port_atomic_cas16 ( volatile uint16 *  data,
uint16  value,
uint16  comp 
)

The atomic compare and exchange operation on uint16.

The function compares the current value of the specified data with the comp value and if they match, swaps the data with the value.

Parameters:
[in,out] data - the pointer to the value
[in] value - the new value
[in] comp - the value to compare with
Returns:
The old value.

uint64 port_atomic_cas64 ( volatile uint64 *  data,
uint64  value,
uint64  comp 
)

The atomic compare and exchange operation on uint64.

The function compares the current value of the specified data with the comp value and if they match, swaps the data with the value.

Parameters:
[in,out] data - the pointer to the value
[in] value - the new value
[in] comp - the value to compare with
Returns:
The old value.


Genereated on Tue Mar 11 19:25:24 2008 by Doxygen.

(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.