1 /* Modules Definitions 2 ** 3 ** Distributed under the terms of the OpenBeOS License. 4 */ 5 6 #ifndef _FSSH_ATOMIC_H 7 #define _FSSH_ATOMIC_H 8 9 10 #include "fssh_types.h" 11 12 13 #ifdef __cplusplus 14 extern "C" { 15 #endif 16 17 18 int32_t fssh_atomic_set(vint32_t *value, int32_t newValue); 19 int32_t fssh_atomic_test_and_set(vint32_t *value, int32_t newValue, 20 int32_t testAgainst); 21 int32_t fssh_atomic_add(vint32_t *value, int32_t addValue); 22 int32_t fssh_atomic_and(vint32_t *value, int32_t andValue); 23 int32_t fssh_atomic_or(vint32_t *value, int32_t orValue); 24 int32_t fssh_atomic_get(vint32_t *value); 25 26 int64_t fssh_atomic_set64(vint64_t *value, int64_t newValue); 27 int64_t fssh_atomic_test_and_set64(vint64_t *value, int64_t newValue, 28 int64_t testAgainst); 29 int64_t fssh_atomic_add64(vint64_t *value, int64_t addValue); 30 int64_t fssh_atomic_and64(vint64_t *value, int64_t andValue); 31 int64_t fssh_atomic_or64(vint64_t *value, int64_t orValue); 32 int64_t fssh_atomic_get64(vint64_t *value); 33 34 #ifdef __cplusplus 35 } 36 #endif 37 38 39 #endif /* _FSSH_ATOMIC_H */ 40