summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/arch/mips
diff options
context:
space:
mode:
authord <d@openbsd.org>2000-10-04 05:55:33 +0000
committerd <d@openbsd.org>2000-10-04 05:55:33 +0000
commit789060e356dc0d45ff8b10b23e67fb240c40e245 (patch)
tree433c497a393444dcea2ecdd760f9bc499789e5b2 /lib/libpthread/arch/mips
parentif fstat fails fails, as it will on some sockets, close anyway. (diff)
downloadwireguard-openbsd-789060e356dc0d45ff8b10b23e67fb240c40e245.tar.xz
wireguard-openbsd-789060e356dc0d45ff8b10b23e67fb240c40e245.zip
switch to _machdep_switch() instead of setjmp/longjmp. For some reason this fixes sparc threads.
Diffstat (limited to 'lib/libpthread/arch/mips')
-rw-r--r--lib/libpthread/arch/mips/uthread_machdep.h40
1 files changed, 4 insertions, 36 deletions
diff --git a/lib/libpthread/arch/mips/uthread_machdep.h b/lib/libpthread/arch/mips/uthread_machdep.h
index 89fb399d629..113a83dc815 100644
--- a/lib/libpthread/arch/mips/uthread_machdep.h
+++ b/lib/libpthread/arch/mips/uthread_machdep.h
@@ -1,38 +1,6 @@
-/*
- * OpenBSD/mips machine-dependent thread macros
- *
- * $OpenBSD: uthread_machdep.h,v 1.4 1999/11/25 07:01:28 d Exp $
- */
+/* $OpenBSD: uthread_machdep.h,v 1.5 2000/10/04 05:55:34 d Exp $ */
+/* David Leonard, <d@csee.uq.edu.au>. Public domain. */
-#include <machine/regnum.h>
-#include <machine/signal.h>
-
-/* floating point state is saved by setjmp/longjmp */
-
-#define _thread_machdep_save_float_state(thr) /* no need */
-#define _thread_machdep_restore_float_state(thr) /* no need */
-
-/* initialise the jmpbuf stack frame so it continues from entry */
-#define _thread_machdep_thread_create(thr, entry, pattr) \
- { \
- struct sigcontext *j = &(thr)->saved_jmp_buf; \
- \
- /* initialise to sane values */ \
- _thread_machdep_setjmp(j); \
- /* entry */ \
- j->sc_regs[RA] = j->sc_pc; /* for gdb */ \
- j->sc_pc = (int)entry; \
- /* stack */ \
- j->sc_regs[SP] = (int) (thr)->stack->base \
- + (thr)->stack->size \
- - sizeof(double); \
- }
-
-#define _thread_machdep_longjmp(a,v) longjmp(a,v)
-#define _thread_machdep_setjmp(a) setjmp(a)
-
-typedef jmp_buf _machdep_jmp_buf;
-
-struct _machdep_struct {
- /* nothing needed */
+struct _machdep_state {
+ int frame;
};