Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
_atomic-parisc.h
Go to the documentation of this file.
1
33#define _RWSTD_NO_CHAR_ATOMIC_OPS
34#define _RWSTD_NO_SHORT_ATOMIC_OPS
35#define _RWSTD_NO_INT_ATOMIC_OPS
36#define _RWSTD_NO_LONG_ATOMIC_OPS
37#define _RWSTD_NO_LLONG_ATOMIC_OPS
38
40
41extern "C" {
42
43// special constraint: the value of both the argument and the result
44// must not be zero
45
46int __rw_atomic_incr32 (int*);
47int __rw_atomic_decr32 (int*);
48int __rw_atomic_xchg32 (int*, int);
49
50} // extern "C"
51
52
53inline int
54__rw_string_atomic_preincrement (int &__x, bool)
55{
56 return __rw_atomic_incr32 (&__x);
57}
58
59
60inline unsigned
61__rw_string_atomic_preincrement (unsigned &__x, bool)
62{
63
64 return __rw_string_atomic_preincrement (_RWSTD_REINTERPRET_CAST(int&, __x),
65 false);
66}
67
68
69inline int
70__rw_string_atomic_predecrement (int &__x, bool)
71{
72 return __rw_atomic_decr32 (&__x);
73}
74
75
76inline unsigned
77__rw_string_atomic_predecrement (unsigned &__x, bool)
78{
79
80 return __rw_string_atomic_predecrement (_RWSTD_REINTERPRET_CAST(int&, __x),
81 false);
82}
83
84
85inline int
86__rw_string_atomic_exchange (int &__x, int __y, bool)
87{
88 return __rw_atomic_xchg32 (&__x, __y);
89}
90
91
92inline unsigned
93__rw_string_atomic_exchange (unsigned &__x, unsigned __y, bool)
94{
95 return __rw_string_atomic_exchange (_RWSTD_REINTERPRET_CAST(int&, __x),
96 _RWSTD_STATIC_CAST(int,__y),
97 false);
98}
99
100} // namespace __rw
#define _RWSTD_REINTERPRET_CAST(T, x)
Definition _defs.h:535
#define _RWSTD_STATIC_CAST(T, x)
Definition _defs.h:534
#define _RWSTD_NAMESPACE(name)
Definition _defs.h:567