diff options
Diffstat (limited to 'lib/libc_r/arch')
-rw-r--r-- | lib/libc_r/arch/alpha/uthread_machdep.h | 10 | ||||
-rw-r--r-- | lib/libc_r/arch/hppa/uthread_machdep.h | 6 | ||||
-rw-r--r-- | lib/libc_r/arch/i386/uthread_machdep.h | 9 | ||||
-rw-r--r-- | lib/libc_r/arch/m68k/uthread_machdep.h | 6 | ||||
-rw-r--r-- | lib/libc_r/arch/m88k/uthread_machdep.h | 6 | ||||
-rw-r--r-- | lib/libc_r/arch/mips/uthread_machdep.h | 6 | ||||
-rw-r--r-- | lib/libc_r/arch/powerpc/uthread_machdep.h | 6 | ||||
-rw-r--r-- | lib/libc_r/arch/sparc/uthread_machdep.h | 20 |
8 files changed, 32 insertions, 37 deletions
diff --git a/lib/libc_r/arch/alpha/uthread_machdep.h b/lib/libc_r/arch/alpha/uthread_machdep.h index 7ee0653367d..9a7c52da977 100644 --- a/lib/libc_r/arch/alpha/uthread_machdep.h +++ b/lib/libc_r/arch/alpha/uthread_machdep.h @@ -1,7 +1,7 @@ /* * OpenBSD/alpha machine-dependent thread macros * - * $OpenBSD: uthread_machdep.h,v 1.4 1999/02/04 23:37:39 niklas Exp $ + * $OpenBSD: uthread_machdep.h,v 1.5 1999/11/25 07:01:27 d Exp $ */ /* save the floating point state of a thread */ @@ -50,11 +50,11 @@ do { \ { \ /* entry */ \ (thr)->saved_jmp_buf[2] = (long) entry; \ - (thr)->saved_jmp_buf[4+R_RA] = 0; \ - (thr)->saved_jmp_buf[4+R_T12] = (long) entry; \ + (thr)->saved_jmp_buf[4 + R_RA] = 0; \ + (thr)->saved_jmp_buf[4 + R_T12] = (long) entry; \ /* stack */ \ - (thr)->saved_jmp_buf[4 + R_SP] = (long) (thr)->stack \ - + (pattr)->stacksize_attr \ + (thr)->saved_jmp_buf[4 + R_SP] = (long) (thr)->stack->base \ + + (thr)->stack->size \ - sizeof(double); \ } diff --git a/lib/libc_r/arch/hppa/uthread_machdep.h b/lib/libc_r/arch/hppa/uthread_machdep.h index 773bd90e22f..0d80d718ded 100644 --- a/lib/libc_r/arch/hppa/uthread_machdep.h +++ b/lib/libc_r/arch/hppa/uthread_machdep.h @@ -1,7 +1,7 @@ /* * OpenBSD/hppa machine-dependent thread macros * - * $OpenBSD: uthread_machdep.h,v 1.2 1999/01/17 23:49:48 d Exp $$ + * $OpenBSD: uthread_machdep.h,v 1.3 1999/11/25 07:01:27 d Exp $$ */ /* save the floating point state of a thread */ @@ -23,8 +23,8 @@ /* entry */ \ (thr)->saved_jmp_buf[5] = (long) entry; \ /* stack */ \ - (thr)->saved_jmp_buf[2] = (long) (thr)->stack \ - + (pattr)->stacksize_attr \ + (thr)->saved_jmp_buf[2] = (long) (thr)->stack->base \ + + (thr)->stack->size \ - sizeof(double); \ } diff --git a/lib/libc_r/arch/i386/uthread_machdep.h b/lib/libc_r/arch/i386/uthread_machdep.h index cac445509ca..dab5c413932 100644 --- a/lib/libc_r/arch/i386/uthread_machdep.h +++ b/lib/libc_r/arch/i386/uthread_machdep.h @@ -1,7 +1,7 @@ /* * OpenBSD/i386 machine-dependent thread macros * - * $OpenBSD: uthread_machdep.h,v 1.5 1999/03/10 09:50:33 d Exp $ + * $OpenBSD: uthread_machdep.h,v 1.6 1999/11/25 07:01:28 d Exp $ */ #include <machine/reg.h> @@ -59,9 +59,10 @@ struct _machdep_struct { /* entry */ \ (thr)->saved_jmp_buf.mjb_eip = (long) entry; \ /* stack */ \ - (thr)->saved_jmp_buf.mjb_esp = (long) (thr)->stack \ - + (pattr)->stacksize_attr \ - - sizeof(double); \ + (thr)->saved_jmp_buf.mjb_esp = \ + (long) (thr)->stack->base + \ + (thr)->stack->size \ + - sizeof(double); \ } static __inline int diff --git a/lib/libc_r/arch/m68k/uthread_machdep.h b/lib/libc_r/arch/m68k/uthread_machdep.h index 4ed702981b5..8bda374924d 100644 --- a/lib/libc_r/arch/m68k/uthread_machdep.h +++ b/lib/libc_r/arch/m68k/uthread_machdep.h @@ -1,7 +1,7 @@ /* * OpenBSD/m68k machine-dependent thread macros * - * $OpenBSD: uthread_machdep.h,v 1.2 1999/01/17 23:49:49 d Exp $ + * $OpenBSD: uthread_machdep.h,v 1.3 1999/11/25 07:01:28 d Exp $ */ /* save the floating point state of a thread */ @@ -23,8 +23,8 @@ /* entry */ \ (thr)->saved_jmp_buf[5] = (long) entry; \ /* stack */ \ - (thr)->saved_jmp_buf[2] = (long) (thr)->stack \ - + (pattr)->stacksize_attr \ + (thr)->saved_jmp_buf[2] = (long) (thr)->stack->base \ + + (thr)->stack->size \ - sizeof(double); \ } diff --git a/lib/libc_r/arch/m88k/uthread_machdep.h b/lib/libc_r/arch/m88k/uthread_machdep.h index dcad59d851d..0fcad5cf0ae 100644 --- a/lib/libc_r/arch/m88k/uthread_machdep.h +++ b/lib/libc_r/arch/m88k/uthread_machdep.h @@ -1,7 +1,7 @@ /* * OpenBSD/m88k machine-dependent thread macros * - * $OpenBSD: uthread_machdep.h,v 1.1 1999/03/03 06:00:10 smurph Exp $ + * $OpenBSD: uthread_machdep.h,v 1.2 1999/11/25 07:01:28 d Exp $ */ /* save the floating point state of a thread */ @@ -23,8 +23,8 @@ /* entry */ \ (thr)->saved_jmp_buf[5] = (long) entry; \ /* stack */ \ - (thr)->saved_jmp_buf[2] = (long) (thr)->stack \ - + (pattr)->stacksize_attr \ + (thr)->saved_jmp_buf[2] = (long) (thr)->stack->base \ + + (thr)->stack->size \ - sizeof(double); \ } diff --git a/lib/libc_r/arch/mips/uthread_machdep.h b/lib/libc_r/arch/mips/uthread_machdep.h index 6052b2003da..89fb399d629 100644 --- a/lib/libc_r/arch/mips/uthread_machdep.h +++ b/lib/libc_r/arch/mips/uthread_machdep.h @@ -1,7 +1,7 @@ /* * OpenBSD/mips machine-dependent thread macros * - * $OpenBSD: uthread_machdep.h,v 1.3 1999/01/17 23:49:49 d Exp $ + * $OpenBSD: uthread_machdep.h,v 1.4 1999/11/25 07:01:28 d Exp $ */ #include <machine/regnum.h> @@ -23,8 +23,8 @@ j->sc_regs[RA] = j->sc_pc; /* for gdb */ \ j->sc_pc = (int)entry; \ /* stack */ \ - j->sc_regs[SP] = (int) (thr)->stack \ - + (pattr)->stacksize_attr \ + j->sc_regs[SP] = (int) (thr)->stack->base \ + + (thr)->stack->size \ - sizeof(double); \ } diff --git a/lib/libc_r/arch/powerpc/uthread_machdep.h b/lib/libc_r/arch/powerpc/uthread_machdep.h index bd713b5ff0e..6041279d95e 100644 --- a/lib/libc_r/arch/powerpc/uthread_machdep.h +++ b/lib/libc_r/arch/powerpc/uthread_machdep.h @@ -1,7 +1,7 @@ /* * OpenBSD/powerpc machine-dependent thread macros * - * $OpenBSD: uthread_machdep.h,v 1.3 1999/04/21 03:45:21 rahnds Exp $ + * $OpenBSD: uthread_machdep.h,v 1.4 1999/11/25 07:01:29 d Exp $ */ /* save the floating point state of a thread */ @@ -24,8 +24,8 @@ (thr)->saved_jmp_buf[JMP_lr] = \ (unsigned int) entry; \ (thr)->saved_jmp_buf[JMP_r1] = \ - ((unsigned int) (thr)->stack \ - + (pattr)->stacksize_attr \ + ((unsigned int) (thr)->stack->base \ + + (thr)->stack->size \ - 0x4) & ~0xf; \ { \ unsigned int *pbacklink = \ diff --git a/lib/libc_r/arch/sparc/uthread_machdep.h b/lib/libc_r/arch/sparc/uthread_machdep.h index c922b49fd0c..46ffd6dc92c 100644 --- a/lib/libc_r/arch/sparc/uthread_machdep.h +++ b/lib/libc_r/arch/sparc/uthread_machdep.h @@ -1,7 +1,7 @@ /* * OpenBSD/sparc machine-dependent thread macros * - * $OpenBSD: uthread_machdep.h,v 1.2 1999/01/17 23:49:49 d Exp $ + * $OpenBSD: uthread_machdep.h,v 1.3 1999/11/25 07:01:29 d Exp $ */ #include <sys/signal.h> @@ -9,13 +9,13 @@ /* save the floating point state of a thread */ #define _thread_machdep_save_float_state(thr) \ { \ - /* XXX tdb */ \ + /* XXX tdb */ \ } /* restore the floating point state of a thread */ #define _thread_machdep_restore_float_state(thr) \ { \ - /* XXX tdb */ \ + /* XXX tdb */ \ } /* initialise the jmpbuf stack frame so it continues from entry */ @@ -25,19 +25,13 @@ /* entry */ \ (thr)->saved_jmp_buf[1] = (long) entry; \ /* stack */ \ - (thr)->saved_jmp_buf[0] = (long) (thr)->stack \ - + (pattr)->stacksize_attr \ + (thr)->saved_jmp_buf[0] = (long) (thr)->stack->base \ + + (thr)->stack->size \ - sizeof(double); \ } -/* - * XXX high chance of longjmp botch (see libc/arch/sparc/gen/_setjmp.S) - * because it uses the frame pointer to pop off frames.. we don't want - * that.. what to do? fudge %fp? do our own setjmp? - */ -#define _thread_machdep_longjmp(a,v) _longjmp(a,v) -#define _thread_machdep_setjmp(a) _setjmp(a) - +#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 { |