File: atomic.h

package info (click to toggle)
wxwidgets3.0 3.0.2%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 120,808 kB
  • ctags: 118,010
  • sloc: cpp: 889,420; makefile: 52,980; ansic: 21,933; sh: 5,603; python: 2,935; xml: 1,534; 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);

//@}