summaryrefslogtreecommitdiff
path: root/lib/libpthread
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2004-01-28 01:51:41 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2004-01-28 01:51:41 +0000
commit9d528e83e791de449894d39edc1e23ee0468c688 (patch)
treecd881b249c1dc3eb91421939a80c4a25f516c6c3 /lib/libpthread
parent5ce3883eea6680a651056bbc57c9f80bf1260376 (diff)
the rest of the libs stuff; from art@ again
Diffstat (limited to 'lib/libpthread')
-rw-r--r--lib/libpthread/arch/amd64/_atomic_lock.c11
-rw-r--r--lib/libpthread/arch/amd64/uthread_machdep.c27
-rw-r--r--lib/libpthread/arch/amd64/uthread_machdep.h5
-rw-r--r--lib/libpthread/arch/amd64/uthread_machdep_asm.S10
-rw-r--r--lib/libpthread/arch/x86_64/_atomic_lock.c11
-rw-r--r--lib/libpthread/arch/x86_64/uthread_machdep.c27
-rw-r--r--lib/libpthread/arch/x86_64/uthread_machdep.h5
-rw-r--r--lib/libpthread/arch/x86_64/uthread_machdep_asm.S10
8 files changed, 106 insertions, 0 deletions
diff --git a/lib/libpthread/arch/amd64/_atomic_lock.c b/lib/libpthread/arch/amd64/_atomic_lock.c
new file mode 100644
index 00000000000..087186e2858
--- /dev/null
+++ b/lib/libpthread/arch/amd64/_atomic_lock.c
@@ -0,0 +1,11 @@
+/*
+ * Atomic lock for amd64
+ */
+
+#include "spinlock.h"
+
+int
+_atomic_lock(volatile _spinlock_lock_t *lock)
+{
+ /* dummy for now */
+}
diff --git a/lib/libpthread/arch/amd64/uthread_machdep.c b/lib/libpthread/arch/amd64/uthread_machdep.c
new file mode 100644
index 00000000000..d66bfbaa853
--- /dev/null
+++ b/lib/libpthread/arch/amd64/uthread_machdep.c
@@ -0,0 +1,27 @@
+#include <machine/param.h>
+#include <pthread.h>
+#include "pthread_private.h"
+
+/*
+ * Given a stack and an entry function, initialise a state
+ * structure that can be later switched to.
+ */
+void
+_thread_machdep_init(struct _machdep_state* statep, void *base, int len,
+ void (*entry)(void))
+{
+ /* dummy */
+}
+
+void
+_thread_machdep_save_float_state(struct _machdep_state *ms)
+{
+ /* dummy */
+}
+
+void
+_thread_machdep_restore_float_state(struct _machdep_state *ms)
+{
+ /* dummy */
+}
+
diff --git a/lib/libpthread/arch/amd64/uthread_machdep.h b/lib/libpthread/arch/amd64/uthread_machdep.h
new file mode 100644
index 00000000000..46f5e9e87d1
--- /dev/null
+++ b/lib/libpthread/arch/amd64/uthread_machdep.h
@@ -0,0 +1,5 @@
+/* dummy */
+
+struct _machdep_state {
+};
+
diff --git a/lib/libpthread/arch/amd64/uthread_machdep_asm.S b/lib/libpthread/arch/amd64/uthread_machdep_asm.S
new file mode 100644
index 00000000000..3a5f255f285
--- /dev/null
+++ b/lib/libpthread/arch/amd64/uthread_machdep_asm.S
@@ -0,0 +1,10 @@
+#include <machine/asm.h>
+
+/*
+ * Switch stacks
+ */
+
+/* void _thread_machdep_switch(new, oldsave); */
+ENTRY(_thread_machdep_switch)
+ /* dummy */
+ ret
diff --git a/lib/libpthread/arch/x86_64/_atomic_lock.c b/lib/libpthread/arch/x86_64/_atomic_lock.c
new file mode 100644
index 00000000000..087186e2858
--- /dev/null
+++ b/lib/libpthread/arch/x86_64/_atomic_lock.c
@@ -0,0 +1,11 @@
+/*
+ * Atomic lock for amd64
+ */
+
+#include "spinlock.h"
+
+int
+_atomic_lock(volatile _spinlock_lock_t *lock)
+{
+ /* dummy for now */
+}
diff --git a/lib/libpthread/arch/x86_64/uthread_machdep.c b/lib/libpthread/arch/x86_64/uthread_machdep.c
new file mode 100644
index 00000000000..d66bfbaa853
--- /dev/null
+++ b/lib/libpthread/arch/x86_64/uthread_machdep.c
@@ -0,0 +1,27 @@
+#include <machine/param.h>
+#include <pthread.h>
+#include "pthread_private.h"
+
+/*
+ * Given a stack and an entry function, initialise a state
+ * structure that can be later switched to.
+ */
+void
+_thread_machdep_init(struct _machdep_state* statep, void *base, int len,
+ void (*entry)(void))
+{
+ /* dummy */
+}
+
+void
+_thread_machdep_save_float_state(struct _machdep_state *ms)
+{
+ /* dummy */
+}
+
+void
+_thread_machdep_restore_float_state(struct _machdep_state *ms)
+{
+ /* dummy */
+}
+
diff --git a/lib/libpthread/arch/x86_64/uthread_machdep.h b/lib/libpthread/arch/x86_64/uthread_machdep.h
new file mode 100644
index 00000000000..46f5e9e87d1
--- /dev/null
+++ b/lib/libpthread/arch/x86_64/uthread_machdep.h
@@ -0,0 +1,5 @@
+/* dummy */
+
+struct _machdep_state {
+};
+
diff --git a/lib/libpthread/arch/x86_64/uthread_machdep_asm.S b/lib/libpthread/arch/x86_64/uthread_machdep_asm.S
new file mode 100644
index 00000000000..3a5f255f285
--- /dev/null
+++ b/lib/libpthread/arch/x86_64/uthread_machdep_asm.S
@@ -0,0 +1,10 @@
+#include <machine/asm.h>
+
+/*
+ * Switch stacks
+ */
+
+/* void _thread_machdep_switch(new, oldsave); */
+ENTRY(_thread_machdep_switch)
+ /* dummy */
+ ret