]>
Commit | Line | Data |
---|---|---|
23324ae1 | 1 | ///////////////////////////////////////////////////////////////////////////// |
7c913512 | 2 | // Name: atomic.h |
e54c96f1 | 3 | // Purpose: interface of global functions |
7c913512 | 4 | // Author: wxWidgets team |
526954c5 | 5 | // Licence: wxWindows licence |
7c913512 FM |
6 | ///////////////////////////////////////////////////////////////////////////// |
7 | ||
39fb8056 FM |
8 | |
9 | // ============================================================================ | |
10 | // Global functions/macros | |
11 | // ============================================================================ | |
12 | ||
b21126db | 13 | /** @addtogroup group_funcmacro_atomic */ |
39fb8056 FM |
14 | //@{ |
15 | ||
7c913512 | 16 | /** |
39fb8056 | 17 | This function increments @a value in an atomic manner. |
1ba0de2e | 18 | |
42124e68 VZ |
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. | |
24 | ||
1ba0de2e | 25 | @header{wx/atomic.h} |
23324ae1 FM |
26 | */ |
27 | void wxAtomicInc(wxAtomicInt& value); | |
28 | ||
39fb8056 | 29 | /** |
42124e68 VZ |
30 | This function decrements value in an atomic manner. |
31 | ||
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. | |
34 | ||
35 | @see wxAtomicInc | |
1ba0de2e BP |
36 | |
37 | @header{wx/atomic.h} | |
39fb8056 FM |
38 | */ |
39 | wxInt32 wxAtomicDec(wxAtomicInt& value); | |
23324ae1 | 40 | |
39fb8056 | 41 | //@} |
1ba0de2e | 42 |