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

/ray/src/lib/threads/atomic.h File Reference

Atomic counters for threaded applications. More...

#include <lib/sconfig.h>
#include <lib/threads/mutex.h>
#include <glib/gthread.h>

Include dependency graph for atomic.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class  AtomicInt
 Atomic integer with atomic operations that C can't guarantee us. More...


Defines

#define _ThreadLibrary_Atomic_H_   1


Detailed Description

Atomic counters for threaded applications.

Author:
Wolfgang Wieser ] wwieser (a) gmx <*> de [
Atomic counters (integers) can be used in many cases instead of mutex-protected counters since they are faster.
Common use is resource counting.

The class AtomicInt implements an atomic integer counter which can be used just as a normal integer with operations increment, decrement, addition and subtraction. Furthermore, special routines to atomically decrement or subtract and then checking the result against zero are implemented.

Definition in file atomic.h.


Define Documentation

#define _ThreadLibrary_Atomic_H_   1
 

Definition at line 18 of file atomic.h.


Generated on Sat Feb 19 22:34:40 2005 for Ray by doxygen 1.3.5