cas.h File Reference

Compare an set methods. More...

#include "typedefs.h"
#include "kernel.h"

Go to the source code of this file.

Functions

BOOL cas_unsigned (POINTER *p, unsigned expected, unsigned value)
 compare and set.
BOOL cas_byte (POINTER *p, byte expected, byte value)
unsigned get_unsigned (POINTER *p)
 inspect the value Is used to inspect the value at the given address.
unsigned get_byte (POINTER *p)


Detailed Description

Compare an set methods.

This files describes the compare and set interface. It may be used to to implement lock free algorthms.

Definition in file cas.h.


Function Documentation

BOOL cas_unsigned POINTER *  p,
unsigned  expected,
unsigned  value
 

compare and set.

If the address to be changed the expected value, it will be changed and a true will be returned. Otherwise no change will be done and false is returned.

Parameters:
p reference to the unsigned int which shall be changed
expected the expected value
value the value which has to be set.

unsigned get_unsigned POINTER *  p  ) 
 

inspect the value Is used to inspect the value at the given address.

Parameters:
p referes to the value to be inspected.


Generated on Mon Sep 29 19:56:48 2008 for mKernel by  doxygen 1.4.6