Implemented new syscalls for 32 and 64 bit atomic operations.

They are only used if the architecture doesn't support them directly.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4360 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
beveloper
2003-08-21 23:02:00 +00:00
parent fb16941a02
commit 50e0ce4bee
13 changed files with 453 additions and 138 deletions
+26
View File
@@ -0,0 +1,26 @@
/*
** 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 */