diff options
author | David Leonard <d@cvs.openbsd.org> | 2000-10-04 05:55:36 +0000 |
---|---|---|
committer | David Leonard <d@cvs.openbsd.org> | 2000-10-04 05:55:36 +0000 |
commit | 8e95e2f842b2fdd99c416cc00a8d321656fea5af (patch) | |
tree | ae270251a663e179dd260f976e6b3ecb477678cf /lib/libpthread/arch/powerpc | |
parent | 367c0082943cc6fa224d021a045222f13f86cfe4 (diff) |
switch to _machdep_switch() instead of setjmp/longjmp. For some reason this fixes sparc threads.
Diffstat (limited to 'lib/libpthread/arch/powerpc')
-rw-r--r-- | lib/libpthread/arch/powerpc/uthread_machdep.h | 46 |
1 files changed, 4 insertions, 42 deletions
diff --git a/lib/libpthread/arch/powerpc/uthread_machdep.h b/lib/libpthread/arch/powerpc/uthread_machdep.h index 6041279d95e..54c864e71a4 100644 --- a/lib/libpthread/arch/powerpc/uthread_machdep.h +++ b/lib/libpthread/arch/powerpc/uthread_machdep.h @@ -1,45 +1,7 @@ -/* - * OpenBSD/powerpc machine-dependent thread macros - * - * $OpenBSD: uthread_machdep.h,v 1.4 1999/11/25 07:01:29 d Exp $ - */ +/* $OpenBSD: uthread_machdep.h,v 1.5 2000/10/04 05:55:35 d Exp $ */ +/* David Leonard, <d@csee.uq.edu.au>. Public domain. */ -/* save the floating point state of a thread */ -#define _thread_machdep_save_float_state(thr) \ - { \ - /* rahnds to fill in */ \ - } - -/* restore the floating point state of a thread */ -#define _thread_machdep_restore_float_state(thr) \ - { \ - /* rahnds to fill in */ \ - } - -#define JMP_r1 (0x04/4) -#define JMP_lr (0x50/4) -/* initialise the jmpbuf stack frame so it continues from entry */ -#define _thread_machdep_thread_create(thr, entry, pattr) \ - { \ - (thr)->saved_jmp_buf[JMP_lr] = \ - (unsigned int) entry; \ - (thr)->saved_jmp_buf[JMP_r1] = \ - ((unsigned int) (thr)->stack->base \ - + (thr)->stack->size \ - - 0x4) & ~0xf; \ - { \ - unsigned int *pbacklink = \ - (thr)->saved_jmp_buf[JMP_r1]; \ - *pbacklink = 0; \ - } \ - } - -#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 xxx; +struct _machdep_state { + int frame; }; |