1 /* 2 ** Copyright 2003, Marcus Overhagen. All rights reserved. 3 ** Distributed under the terms of the OpenBeOS License. 4 */ 5 #ifndef _KERNEL_USER_ATOMIC_H 6 #define _KERNEL_USER_ATOMIC_H 7 8 /* If the architecture doesn't support atomic functions 9 * in userspace, they are implemented as these syscalls. 10 */ 11 12 int32 _user_atomic_set(vint32 *value, int32 newValue); 13 int32 _user_atomic_test_and_set(vint32 *value, int32 newValue, int32 testAgainst); 14 int32 _user_atomic_add(vint32 *value, int32 addValue); 15 int32 _user_atomic_and(vint32 *value, int32 andValue); 16 int32 _user_atomic_or(vint32 *value, int32 orValue); 17 int32 _user_atomic_get(vint32 *value); 18 19 int64 _user_atomic_set64(vint64 *value, int64 newValue); 20 int64 _user_atomic_test_and_set64(vint64 *value, int64 newValue, int64 testAgainst); 21 int64 _user_atomic_add64(vint64 *value, int64 addValue); 22 int64 _user_atomic_and64(vint64 *value, int64 andValue); 23 int64 _user_atomic_or64(vint64 *value, int64 orValue); 24 int64 _user_atomic_get64(vint64 *value); 25 26 #endif /* _KERNEL_USER_ATOMIC_H */ 27