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