#include <stdio.h>
#include <sys/param.h>
#include <sys/file.h>
+#include "sbcl.h"
#include "./signal.h"
#include "os.h"
#include "arch.h"
#include "interrupt.h"
#include "interr.h"
#include "lispregs.h"
-#include "sbcl.h"
#include <sys/socket.h>
#include <sys/utsname.h>
#ifdef LISP_FEATURE_SB_THREAD
#error "Define threading support functions"
#else
-struct thread *arch_os_get_current_thread() {
- return all_threads;
-}
int arch_os_thread_init(struct thread *thread) {
- return 1; /* success */
+ return 1; /* success */
}
int arch_os_thread_cleanup(struct thread *thread) {
- return 1; /* success */
+ return 1; /* success */
}
#endif
os_context_register_addr(os_context_t *context, int offset)
{
if (offset == 0) {
- static int zero;
- zero = 0;
- return &zero;
+ static int zero;
+ zero = 0;
+ return &zero;
} else if (offset < 16) {
- return &context->uc_mcontext.gregs[offset+3];
+ return &context->uc_mcontext.gregs[offset+3];
} else if (offset < 32) {
- /* FIXME: You know, this (int *) stuff looks decidedly
- dubious */
- int *sp = (int*) context->uc_mcontext.gregs[REG_SP];
- return &(sp[offset-16]);
+ /* FIXME: You know, this (int *) stuff looks decidedly
+ dubious */
+ int *sp = (int*) context->uc_mcontext.gregs[REG_SP];
+ return &(sp[offset-16]);
} else {
- return 0;
+ return 0;
}
}