diff options
Diffstat (limited to 'lib/libc_r')
-rw-r--r-- | lib/libc_r/arch/m88k/_atomic_lock.c | 19 | ||||
-rw-r--r-- | lib/libc_r/arch/m88k/uthread_machdep.h | 40 |
2 files changed, 59 insertions, 0 deletions
diff --git a/lib/libc_r/arch/m88k/_atomic_lock.c b/lib/libc_r/arch/m88k/_atomic_lock.c new file mode 100644 index 00000000000..a6ca8e7f71f --- /dev/null +++ b/lib/libc_r/arch/m88k/_atomic_lock.c @@ -0,0 +1,19 @@ +/* $OpenBSD: _atomic_lock.c,v 1.1 1999/03/03 06:00:10 smurph Exp $ */ +/* + * Atomic lock for m68k + */ + +#include "spinlock.h" + +int +_atomic_lock(volatile _spinlock_lock_t *lock) +{ + return (_thread_slow_atomic_lock(lock)); +} + +int +_atomic_is_locked(volatile _spinlock_lock_t *lock) +{ + + return (*lock != _SPINLOCK_UNLOCKED); +} diff --git a/lib/libc_r/arch/m88k/uthread_machdep.h b/lib/libc_r/arch/m88k/uthread_machdep.h new file mode 100644 index 00000000000..dcad59d851d --- /dev/null +++ b/lib/libc_r/arch/m88k/uthread_machdep.h @@ -0,0 +1,40 @@ +/* + * OpenBSD/m88k machine-dependent thread macros + * + * $OpenBSD: uthread_machdep.h,v 1.1 1999/03/03 06:00:10 smurph Exp $ + */ + +/* save the floating point state of a thread */ +#define _thread_machdep_save_float_state(thr) \ + { \ + /* fsave privileged instr */ \ + } + +/* restore the floating point state of a thread */ +#define _thread_machdep_restore_float_state(thr) \ + { \ + /* frestore privileged instr */ \ + } + +/* initialise the jmpbuf stack frame so it continues from entry */ + +#define _thread_machdep_thread_create(thr, entry, pattr) \ + { \ + /* entry */ \ + (thr)->saved_jmp_buf[5] = (long) entry; \ + /* stack */ \ + (thr)->saved_jmp_buf[2] = (long) (thr)->stack \ + + (pattr)->stacksize_attr \ + - 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 { + /* char saved_fp[108]; */ + int dummy; +}; + |