2007-04-27 16:17:22 +04:00
|
|
|
/* Modules Definitions
|
|
|
|
**
|
|
|
|
** Distributed under the terms of the OpenBeOS License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _FSSH_ATOMIC_H
|
|
|
|
#define _FSSH_ATOMIC_H
|
|
|
|
|
|
|
|
|
|
|
|
#include "fssh_types.h"
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2013-11-06 01:32:59 +04:00
|
|
|
void fssh_atomic_set(int32_t* value, int32_t newValue);
|
|
|
|
int32_t fssh_atomic_get_and_set(int32_t* value, int32_t newValue);
|
|
|
|
int32_t fssh_atomic_test_and_set(int32_t *value, int32_t newValue,
|
2007-04-27 16:17:22 +04:00
|
|
|
int32_t testAgainst);
|
2013-11-06 01:32:59 +04:00
|
|
|
int32_t fssh_atomic_add(int32_t *value, int32_t addValue);
|
|
|
|
int32_t fssh_atomic_and(int32_t *value, int32_t andValue);
|
|
|
|
int32_t fssh_atomic_or(int32_t *value, int32_t orValue);
|
|
|
|
int32_t fssh_atomic_get(int32_t *value);
|
|
|
|
|
|
|
|
void fssh_atomic_set64(int64_t* value, int64_t newValue);
|
|
|
|
int64_t fssh_atomic_get_and_set64(int64_t* value, int64_t newValue);
|
|
|
|
int64_t fssh_atomic_test_and_set64(int64_t *value, int64_t newValue,
|
2007-06-17 14:50:18 +04:00
|
|
|
int64_t testAgainst);
|
2013-11-06 01:32:59 +04:00
|
|
|
int64_t fssh_atomic_add64(int64_t *value, int64_t addValue);
|
|
|
|
int64_t fssh_atomic_and64(int64_t *value, int64_t andValue);
|
|
|
|
int64_t fssh_atomic_or64(int64_t *value, int64_t orValue);
|
|
|
|
int64_t fssh_atomic_get64(int64_t *value);
|
2007-04-27 16:17:22 +04:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* _FSSH_ATOMIC_H */
|