summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2003-04-01 00:18:55 +0000
committerjeff <jeff@FreeBSD.org>2003-04-01 00:18:55 +0000
commit420a77ecd5237fe6d8d85dfc52e0e7050554b768 (patch)
treed76cda4e540786cf76f11bcb84ebefd1fd2bfd17 /sys/powerpc
parent56865cc54968bbe0d21f2909d13cfade62bb789d (diff)
downloadFreeBSD-src-420a77ecd5237fe6d8d85dfc52e0e7050554b768.zip
FreeBSD-src-420a77ecd5237fe6d8d85dfc52e0e7050554b768.tar.gz
- Define a new md function 'casuptr'. This atomically compares and sets
a pointer that is in user space. It will be used as the basic primitive for a kernel supported user space lock implementation. - Implement this function in x86's support.s - Provide stubs that return -1 in all other architectures. Implementations will follow along shortly. Reviewed by: jake
Diffstat (limited to 'sys/powerpc')
-rw-r--r--sys/powerpc/aim/machdep.c8
-rw-r--r--sys/powerpc/powerpc/machdep.c8
2 files changed, 16 insertions, 0 deletions
diff --git a/sys/powerpc/aim/machdep.c b/sys/powerpc/aim/machdep.c
index 54661aa..e904fa3 100644
--- a/sys/powerpc/aim/machdep.c
+++ b/sys/powerpc/aim/machdep.c
@@ -752,3 +752,11 @@ kcopy(const void *src, void *dst, size_t len)
td->td_pcb->pcb_onfault = oldfault;
return (0);
}
+
+
+intptr_t
+casuptr(intptr_t *p, intptr_t old, intptr_t new)
+{
+ return (-1);
+}
+
diff --git a/sys/powerpc/powerpc/machdep.c b/sys/powerpc/powerpc/machdep.c
index 54661aa..e904fa3 100644
--- a/sys/powerpc/powerpc/machdep.c
+++ b/sys/powerpc/powerpc/machdep.c
@@ -752,3 +752,11 @@ kcopy(const void *src, void *dst, size_t len)
td->td_pcb->pcb_onfault = oldfault;
return (0);
}
+
+
+intptr_t
+casuptr(intptr_t *p, intptr_t old, intptr_t new)
+{
+ return (-1);
+}
+
OpenPOWER on IntegriCloud