haiku/headers/private/kernel/user_atomic.h
beveloper 188b5de0bf renamed atomic_read() into atomic_get() (since we already have atomic_set(), but not a atomic_write())
renamed user_??? functions into the new _user_??? naming style.
changed implementation of PPC 64 bit atomic functions to use (un)lock_memory()


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4417 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-31 01:21:56 +00:00

27 lines
1.0 KiB
C

/*
** 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_get(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_get64(vint64 *value);
#endif /* _KERNEL_USER_ATOMIC_H */