diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2001-09-10 20:00:15 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2001-09-10 20:00:15 +0000 |
commit | cf0a3aafd4f3d1aebfa8491b8f0ba507c8baa802 (patch) | |
tree | 11bb9eaa68a8c3e3c09598bca2a9222981973214 /lib/libc_r/arch/sparc64/uthread_machdep.c | |
parent | 37e8cc1621c3eff734b8d369f2f1a1aa0a2147d6 (diff) |
Enough for libc_r on sparc64 to build (this stuff is mostly taken from sparc,
and will need attention before it can be expected to work).
Diffstat (limited to 'lib/libc_r/arch/sparc64/uthread_machdep.c')
-rw-r--r-- | lib/libc_r/arch/sparc64/uthread_machdep.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/lib/libc_r/arch/sparc64/uthread_machdep.c b/lib/libc_r/arch/sparc64/uthread_machdep.c new file mode 100644 index 00000000000..eaea79af8d3 --- /dev/null +++ b/lib/libc_r/arch/sparc64/uthread_machdep.c @@ -0,0 +1,45 @@ +/* $OpenBSD: uthread_machdep.c,v 1.1 2001/09/10 20:00:14 jason Exp $ */ + +/* + * Machine-dependent thread state functions for OpenBSD/sparc. + */ + +#include <sys/types.h> +#include <machine/frame.h> +#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(statep, base, len, entry) + struct _machdep_state* statep; + void *base; + int len; + void (*entry)(void); +{ + struct frame64 *f; + + /* Locate the initial frame, aligned at the top of the stack */ + f = (struct frame64 *)(((int)base + len - sizeof *f) & ~ALIGNBYTES); + + f->fr_fp = (struct frame64 *)-1; /* purposefully misaligned */ + f->fr_pc = -1; /* for gdb */ + statep->fp = (int)f; + statep->pc = -8 + (int)entry; +} + +void +_thread_machdep_save_float_state(statep) + struct _machdep_state* statep; +{ +} + +void +_thread_machdep_restore_float_state(statep) + struct _machdep_state* statep; +{ +} |