1/* Modules Definitions 2** 3** Distributed under the terms of the MIT 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 14extern "C" { 15#endif 16 17 18void fssh_atomic_set(int32_t* value, int32_t newValue); 19int32_t fssh_atomic_get_and_set(int32_t* value, int32_t newValue); 20int32_t fssh_atomic_test_and_set(int32_t *value, int32_t newValue, 21 int32_t testAgainst); 22int32_t fssh_atomic_add(int32_t *value, int32_t addValue); 23int32_t fssh_atomic_and(int32_t *value, int32_t andValue); 24int32_t fssh_atomic_or(int32_t *value, int32_t orValue); 25int32_t fssh_atomic_get(int32_t *value); 26 27void fssh_atomic_set64(int64_t* value, int64_t newValue); 28int64_t fssh_atomic_get_and_set64(int64_t* value, int64_t newValue); 29int64_t fssh_atomic_test_and_set64(int64_t *value, int64_t newValue, 30 int64_t testAgainst); 31int64_t fssh_atomic_add64(int64_t *value, int64_t addValue); 32int64_t fssh_atomic_and64(int64_t *value, int64_t andValue); 33int64_t fssh_atomic_or64(int64_t *value, int64_t orValue); 34int64_t fssh_atomic_get64(int64_t *value); 35 36#ifdef __cplusplus 37} 38#endif 39 40 41#endif /* _FSSH_ATOMIC_H */ 42