summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libc_r/arch/vax/_atomic_lock.c20
-rw-r--r--lib/libc_r/arch/vax/uthread_machdep.h6
-rw-r--r--lib/libpthread/arch/vax/_atomic_lock.c20
-rw-r--r--lib/libpthread/arch/vax/uthread_machdep.h6
4 files changed, 52 insertions, 0 deletions
diff --git a/lib/libc_r/arch/vax/_atomic_lock.c b/lib/libc_r/arch/vax/_atomic_lock.c
new file mode 100644
index 00000000000..22f95ffe38c
--- /dev/null
+++ b/lib/libc_r/arch/vax/_atomic_lock.c
@@ -0,0 +1,20 @@
+/* $OpenBSD: _atomic_lock.c,v 1.1 2001/01/27 21:23:56 hugh Exp $ */
+
+/*
+ * Atomic lock for vax
+ */
+
+#include "spinlock.h"
+
+int
+_atomic_lock(volatile _spinlock_lock_t *lock)
+{
+ return (_thread_slow_atomic_lock(lock));
+}
+
+int
+_atomic_is_locked(volatile _spinlock_lock_t *lock)
+{
+
+ return (*lock != _SPINLOCK_UNLOCKED);
+}
diff --git a/lib/libc_r/arch/vax/uthread_machdep.h b/lib/libc_r/arch/vax/uthread_machdep.h
new file mode 100644
index 00000000000..75fefff1655
--- /dev/null
+++ b/lib/libc_r/arch/vax/uthread_machdep.h
@@ -0,0 +1,6 @@
+/* $OpenBSD: uthread_machdep.h,v 1.1 2001/01/27 21:23:57 hugh Exp $ */
+/* David Leonard, <d@csee.uq.edu.au>. Public domain. */
+
+struct _machdep_state {
+ int frame;
+};
diff --git a/lib/libpthread/arch/vax/_atomic_lock.c b/lib/libpthread/arch/vax/_atomic_lock.c
new file mode 100644
index 00000000000..22f95ffe38c
--- /dev/null
+++ b/lib/libpthread/arch/vax/_atomic_lock.c
@@ -0,0 +1,20 @@
+/* $OpenBSD: _atomic_lock.c,v 1.1 2001/01/27 21:23:56 hugh Exp $ */
+
+/*
+ * Atomic lock for vax
+ */
+
+#include "spinlock.h"
+
+int
+_atomic_lock(volatile _spinlock_lock_t *lock)
+{
+ return (_thread_slow_atomic_lock(lock));
+}
+
+int
+_atomic_is_locked(volatile _spinlock_lock_t *lock)
+{
+
+ return (*lock != _SPINLOCK_UNLOCKED);
+}
diff --git a/lib/libpthread/arch/vax/uthread_machdep.h b/lib/libpthread/arch/vax/uthread_machdep.h
new file mode 100644
index 00000000000..75fefff1655
--- /dev/null
+++ b/lib/libpthread/arch/vax/uthread_machdep.h
@@ -0,0 +1,6 @@
+/* $OpenBSD: uthread_machdep.h,v 1.1 2001/01/27 21:23:57 hugh Exp $ */
+/* David Leonard, <d@csee.uq.edu.au>. Public domain. */
+
+struct _machdep_state {
+ int frame;
+};