projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sb-bsd-sockets: foreign memory leak in GET-PROTOCOL-BY-NAME
[sbcl.git]
/
src
/
runtime
/
sparc-sunos-os.c
diff --git
a/src/runtime/sparc-sunos-os.c
b/src/runtime/sparc-sunos-os.c
index
76459f4
..
fc76ee7
100644
(file)
--- a/
src/runtime/sparc-sunos-os.c
+++ b/
src/runtime/sparc-sunos-os.c
@@
-17,6
+17,7
@@
#include <stdio.h>
#include <sys/param.h>
#include <sys/file.h>
#include <stdio.h>
#include <sys/param.h>
#include <sys/file.h>
+#include "sbcl.h"
#include "./signal.h"
#include "os.h"
#include "arch.h"
#include "./signal.h"
#include "os.h"
#include "arch.h"
@@
-24,62
+25,73
@@
#include "interrupt.h"
#include "interr.h"
#include "lispregs.h"
#include "interrupt.h"
#include "interr.h"
#include "lispregs.h"
-#include "sbcl.h"
#include <sys/socket.h>
#include <sys/utsname.h>
#include <sys/types.h>
#include <signal.h>
#include <sys/socket.h>
#include <sys/utsname.h>
#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"
#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
+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_addr(os_context_t *context, int offset)
{
if (offset == 0) {
#endif
os_context_register_t *
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) {
} else if (offset < 16) {
- return &context->uc_mcontext.gregs[offset+3];
+ return &context->uc_mcontext.gregs[offset+3];
} else if (offset < 32) {
} 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 {
} else {
- return 0;
+ return 0;
}
}
os_context_register_t *
os_context_pc_addr(os_context_t *context)
{
}
}
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)
{
}
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)
{
}
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)
{
}
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);
}
}