#include <sys/types.h>
#include <signal.h>
-/* #include <sys/sysinfo.h> */
#include <sys/time.h>
#include <sys/stat.h>
#include <unistd.h>
#include "validate.h"
-#if defined GENCGC /* unlikely ... */
-#include "gencgc.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 */
+}
+int arch_os_thread_cleanup(struct thread *thread) {
+ return 1; /* success */
+}
#endif
os_context_register_t *
os_context_register_t *
os_context_pc_addr(os_context_t *context)
{
- return &(context->uc_mcontext.gregs[REG_PC]);
+ return &(context->uc_mcontext.gregs[REG_PC]);
}
os_context_register_t *
os_context_npc_addr(os_context_t *context)
{
- return &(context->uc_mcontext.gregs[REG_nPC]);
+ return &(context->uc_mcontext.gregs[REG_nPC]);
}
sigset_t *
os_context_sigmask_addr(os_context_t *context)
{
- return &(context->uc_sigmask);
+ return &(context->uc_sigmask);
+}
+
+unsigned long
+os_context_fp_control(os_context_t *context)
+{
+ return (context->uc_mcontext.fpregs.fpu_fsr);
}
void os_flush_icache(os_vm_address_t address, os_vm_size_t length)
{
- /* FIXME. There's a bit of stuff in the CMUCL version. It may or
- may not be needed */
+ /* see sparc-assem.S */
+ sparc_flush_icache(address, length);
}