Friedrich-Alexander-Universität UnivisSuche FAU-Logo
Techn. Fakultät Willkommen am Department Informatik FAU-Logo
Logo I4
Lehrstuhl für Informatik 4
SP
 
  SP1
  SP2
Übungen
  Anmeldung
  Folien
  Aufgaben
Department Informatik  >  Informatik 4  >  Lehre  >  SS 2011  >  SP  >  Übung  >  Doku  >  multithreaded webserver: cas.h File Reference

process list

cas.h File Reference

CAS implementation using the gcc builtin. More...

Go to the source code of this file.

Functions

__inline__ int cas (volatile unsigned int *ref, unsigned int exp, unsigned int val)
 Compare and swap using gcc builtin.

Detailed Description

CAS implementation using the gcc builtin.


Function Documentation

__inline__ int cas ( volatile unsigned int *  ref,
unsigned int  exp,
unsigned int  val 
)

Compare and swap using gcc builtin.

This function uses the gcc builtin __sync_bool_compare_and_swap. See http://gcc.gnu.org/onlinedocs/gcc/Atomic-Builtins.html for more details.

Note: extern inline forces GCC to always inline this function an to not generate a standalone version of the function.

  Impressum   Datenschutz Stand: 2011-07-04 18:03   MS