summaryrefslogtreecommitdiff
path: root/lib/libpthread
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libpthread')
-rw-r--r--lib/libpthread/arch/sparc/uthread_machdep.h24
1 files changed, 11 insertions, 13 deletions
diff --git a/lib/libpthread/arch/sparc/uthread_machdep.h b/lib/libpthread/arch/sparc/uthread_machdep.h
index 46ffd6dc92c..53ad543f77a 100644
--- a/lib/libpthread/arch/sparc/uthread_machdep.h
+++ b/lib/libpthread/arch/sparc/uthread_machdep.h
@@ -1,7 +1,7 @@
/*
* OpenBSD/sparc machine-dependent thread macros
*
- * $OpenBSD: uthread_machdep.h,v 1.3 1999/11/25 07:01:29 d Exp $
+ * $OpenBSD: uthread_machdep.h,v 1.4 2000/01/06 07:04:54 d Exp $
*/
#include <sys/signal.h>
@@ -18,22 +18,20 @@
/* XXX tdb */ \
}
-/* initialise the jmpbuf stack frame so it continues from entry */
+typedef long _machdep_jmp_buf[2];
+
+int _thread_machdep_setjmp __P((_machdep_jmp_buf));
+void _thread_machdep_longjmp __P((_machdep_jmp_buf, int));
+/* initialise the jmpbuf stack frame so it continues from entry */
#define _thread_machdep_thread_create(thr, entry, pattr) \
- { \
- /* entry */ \
- (thr)->saved_jmp_buf[1] = (long) entry; \
- /* stack */ \
- (thr)->saved_jmp_buf[0] = (long) (thr)->stack->base \
- + (thr)->stack->size \
- - sizeof(double); \
+ { \
+ long stack = (long)(thr)->stack->base + \
+ (thr)->stack->size - 64; \
+ (thr)->saved_jmp_buf[0] = (long)stack; \
+ (thr)->saved_jmp_buf[1] = (long)entry - 8; \
}
-#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 {
/* char saved_fp[???]; */
int dummy;