File: atomic.h

package info (click to toggle)
wxwidgets3.0 3.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 137,016 kB
  • ctags: 131,238
  • sloc: cpp: 890,738; ansic: 153,196; makefile: 54,278; sh: 35,291; python: 2,935; xml: 1,797; awk: 780; asm: 485; perl: 281
file content (42 lines) | stat: -rw-r--r-- 1,325 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/////////////////////////////////////////////////////////////////////////////
// Name:        atomic.h
// Purpose:     interface of global functions
// Author:      wxWidgets team
// Licence:     wxWindows licence
/////////////////////////////////////////////////////////////////////////////


// ============================================================================
// Global functions/macros
// ============================================================================

/** @addtogroup group_funcmacro_atomic */
//@{

/**
    This function increments @a value in an atomic manner.

    Whenever possible wxWidgets provides an efficient, CPU-specific,
    implementation of this function. If such implementation is available, the
    symbol wxHAS_ATOMIC_OPS is defined. Otherwise this function still exists
    but is implemented in a generic way using a critical section which can be
    prohibitively expensive for use in performance-sensitive code.

    @header{wx/atomic.h}
*/
void wxAtomicInc(wxAtomicInt& value);

/**
    This function decrements value in an atomic manner.

    Returns 0 if value is 0 after decrement or any non-zero value (not
    necessarily equal to the value of the variable) otherwise.

    @see wxAtomicInc

    @header{wx/atomic.h}
*/
wxInt32 wxAtomicDec(wxAtomicInt& value);

//@}