Applied patches for #15184 (wxRichTextAction fix for when the command identifier...
[wxWidgets.git] / interface / wx / atomic.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: atomic.h
3 // Purpose: interface of global functions
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
8
9
10 // ============================================================================
11 // Global functions/macros
12 // ============================================================================
13
14 /** @addtogroup group_funcmacro_atomic */
15 //@{
16
17 /**
18 This function increments @a value in an atomic manner.
19
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.
25
26 @header{wx/atomic.h}
27 */
28 void wxAtomicInc(wxAtomicInt& value);
29
30 /**
31 This function decrements value in an atomic manner.
32
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.
35
36 @see wxAtomicInc
37
38 @header{wx/atomic.h}
39 */
40 wxInt32 wxAtomicDec(wxAtomicInt& value);
41
42 //@}
43