haiku/headers/private/kernel/user_atomic.h
François Revol 4b8d0e6856 Some ppc fixes for , patch by kallisti5 (without the #ifdef _BOOT_MODE):
- stubbed out arch_cpu_init_percpu(),
- make atomic ops declarations extern "C",
- move calls to [i]sync inside the asm code that needs it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32067 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 10:10:22 +00:00

36 lines
1.1 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.
*/
#ifdef __cplusplus
extern "C" {
#endif
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);
#ifdef __cplusplus
}
#endif
#endif /* _KERNEL_USER_ATOMIC_H */