26 #if defined (HAVE_CONFIG_H)
34 #if defined (OCTAVE_STDATOMIC_H_OK)
35 # include <stdatomic.h>
55 #elif defined (__GNUC__)
60 return __sync_add_and_fetch (
x, 1);
66 return __sync_sub_and_fetch (
x, 1);
69 #elif defined (_MSC_VER)
75 #if defined (OCTAVE_ENABLE_64)
76 return _InterlockedIncrement64 (
x);
78 return _InterlockedIncrement (
x);
85 #if defined (OCTAVE_ENABLE_64)
86 return _InterlockedDecrement64 (
x);
88 return _InterlockedDecrement (
x);
93 # error "Octave requires atomic integer increment and decrement functions"
F77_RET_T const F77_DBLE * x
OCTAVE_API octave_idx_type octave_atomic_increment(octave_idx_type *x)
OCTAVE_API octave_idx_type octave_atomic_decrement(octave_idx_type *x)