summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2006-08-28 02:28:15 +0000
committerdavidxu <davidxu@FreeBSD.org>2006-08-28 02:28:15 +0000
commit87b5aa08ee93b317c4d88805ce8e361853411027 (patch)
tree7be2d51c02f47e64ee8dc4e4ec29bd1716dd3c70 /sys/powerpc
parentf2ccfe95252579f4a77ff68a316f2f07850f0277 (diff)
downloadFreeBSD-src-87b5aa08ee93b317c4d88805ce8e361853411027.zip
FreeBSD-src-87b5aa08ee93b317c4d88805ce8e361853411027.tar.gz
Implement casuword32, compare and set user integer, thank Marcel Moolenarr
who wrote the IA64 version of casuword32.
Diffstat (limited to 'sys/powerpc')
-rw-r--r--sys/powerpc/aim/copyinout.c6
-rw-r--r--sys/powerpc/powerpc/copyinout.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/sys/powerpc/aim/copyinout.c b/sys/powerpc/aim/copyinout.c
index 7fa91ce..4c19cbf 100644
--- a/sys/powerpc/aim/copyinout.c
+++ b/sys/powerpc/aim/copyinout.c
@@ -322,6 +322,12 @@ fuword32(const void *addr)
return ((int32_t)fuword(addr));
}
+int32_t
+casuword32(int32_t *base, int32_t oldval, int32_t newval)
+{
+ return (casuptr(base, oldval, newval));
+}
+
intptr_t
casuptr(intptr_t *addr, intptr_t old, intptr_t new)
{
diff --git a/sys/powerpc/powerpc/copyinout.c b/sys/powerpc/powerpc/copyinout.c
index 7fa91ce..4c19cbf 100644
--- a/sys/powerpc/powerpc/copyinout.c
+++ b/sys/powerpc/powerpc/copyinout.c
@@ -322,6 +322,12 @@ fuword32(const void *addr)
return ((int32_t)fuword(addr));
}
+int32_t
+casuword32(int32_t *base, int32_t oldval, int32_t newval)
+{
+ return (casuptr(base, oldval, newval));
+}
+
intptr_t
casuptr(intptr_t *addr, intptr_t old, intptr_t new)
{
OpenPOWER on IntegriCloud