/* ** Copyright 2003, Marcus Overhagen. All rights reserved. ** Distributed under the terms of the OpenBeOS License. */ #ifndef _KERNEL_USER_ATOMIC_H #define _KERNEL_USER_ATOMIC_H /* If the architecture doesn't support atomic functions * in userspace, they are implemented as these syscalls. */ int32 user_atomic_set(vint32 *value, int32 newValue); int32 user_atomic_test_and_set(vint32 *value, int32 newValue, int32 testAgainst); int32 user_atomic_add(vint32 *value, int32 addValue); int32 user_atomic_and(vint32 *value, int32 andValue); int32 user_atomic_or(vint32 *value, int32 orValue); int32 user_atomic_read(vint32 *value); int64 user_atomic_set64(vint64 *value, int64 newValue); int64 user_atomic_test_and_set64(vint64 *value, int64 newValue, int64 testAgainst); int64 user_atomic_add64(vint64 *value, int64 addValue); int64 user_atomic_and64(vint64 *value, int64 andValue); int64 user_atomic_or64(vint64 *value, int64 orValue); int64 user_atomic_read64(vint64 *value); #endif /* _KERNEL_USER_ATOMIC_H */