]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/atomic.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of global functions
4 // Author: wxWidgets team
5 // Licence: wxWindows licence
6 /////////////////////////////////////////////////////////////////////////////
9 // ============================================================================
10 // Global functions/macros
11 // ============================================================================
13 /** @addtogroup group_funcmacro_atomic */
17 This function increments @a value in an atomic manner.
19 Whenever possible wxWidgets provides an efficient, CPU-specific,
20 implementation of this function. If such implementation is available, the
21 symbol wxHAS_ATOMIC_OPS is defined. Otherwise this function still exists
22 but is implemented in a generic way using a critical section which can be
23 prohibitively expensive for use in performance-sensitive code.
27 void wxAtomicInc(wxAtomicInt
& value
);
30 This function decrements value in an atomic manner.
32 Returns 0 if value is 0 after decrement or any non-zero value (not
33 necessarily equal to the value of the variable) otherwise.
39 wxInt32
wxAtomicDec(wxAtomicInt
& value
);