projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.8.9.6.netbsd.2:
[sbcl.git]
/
src
/
runtime
/
x86-arch.c
diff --git
a/src/runtime/x86-arch.c
b/src/runtime/x86-arch.c
index
5063c98
..
fbe318b
100644
(file)
--- a/
src/runtime/x86-arch.c
+++ b/
src/runtime/x86-arch.c
@@
-24,6
+24,10
@@
#include "interr.h"
#include "breakpoint.h"
#include "monitor.h"
#include "interr.h"
#include "breakpoint.h"
#include "monitor.h"
+#include "thread.h"
+
+#include "genesis/static-symbols.h"
+#include "genesis/symbol.h"
#define BREAKPOINT_INST 0xcc /* INT3 */
#define BREAKPOINT_INST 0xcc /* INT3 */
@@
-51,8
+55,10
@@
context_eflags_addr(os_context_t *context)
return &context->uc_mcontext.gregs[16];
#elif defined __FreeBSD__
return &context->uc_mcontext.mc_eflags;
return &context->uc_mcontext.gregs[16];
#elif defined __FreeBSD__
return &context->uc_mcontext.mc_eflags;
-#elif defined __OpenBSD__
+#elif defined __OpenBSD__ || defined __NetBSD__
return &context->sc_eflags;
return &context->sc_eflags;
+#elif defined __NetBSD__
+ return &(context->uc_mcontext.__gregs[_REG_EFL]);
#else
#error unsupported OS
#endif
#else
#error unsupported OS
#endif
@@
-68,8
+74,7
@@
void arch_skip_instruction(os_context_t *context)
int vlen;
int code;
int vlen;
int code;
- FSHOW((stderr, "/[arch_skip_inst at %x]\n", *os_context_pc_addr(context)));
-
+
/* Get and skip the Lisp interrupt code. */
code = *(char*)(*os_context_pc_addr(context))++;
switch (code)
/* Get and skip the Lisp interrupt code. */
code = *(char*)(*os_context_pc_addr(context))++;
switch (code)
@@
-112,13
+117,14
@@
arch_internal_error_arguments(os_context_t *context)
boolean
arch_pseudo_atomic_atomic(os_context_t *context)
{
boolean
arch_pseudo_atomic_atomic(os_context_t *context)
{
- return SymbolValue(PSEUDO_ATOMIC_ATOMIC);
+ return SymbolValue(PSEUDO_ATOMIC_ATOMIC,arch_os_get_current_thread());
}
void
arch_set_pseudo_atomic_interrupted(os_context_t *context)
{
}
void
arch_set_pseudo_atomic_interrupted(os_context_t *context)
{
- SetSymbolValue(PSEUDO_ATOMIC_INTERRUPTED, make_fixnum(1));
+ SetSymbolValue(PSEUDO_ATOMIC_INTERRUPTED, make_fixnum(1),
+ arch_os_get_current_thread());
}
\f
/*
}
\f
/*
@@
-187,6
+193,7
@@
sigtrap_handler(int signal, siginfo_t *info, void *void_context)
int code = info->si_code;
os_context_t *context = (os_context_t*)void_context;
unsigned int trap;
int code = info->si_code;
os_context_t *context = (os_context_t*)void_context;
unsigned int trap;
+ sigset_t ss;
if (single_stepping && (signal==SIGTRAP))
{
if (single_stepping && (signal==SIGTRAP))
{
@@
-237,6
+244,9
@@
sigtrap_handler(int signal, siginfo_t *info, void *void_context)
case trap_PendingInterrupt:
FSHOW((stderr, "/<trap pending interrupt>\n"));
arch_skip_instruction(context);
case trap_PendingInterrupt:
FSHOW((stderr, "/<trap pending interrupt>\n"));
arch_skip_instruction(context);
+ sigemptyset(&ss);
+ sigaddset(&ss,SIGTRAP);
+ sigprocmask(SIG_UNBLOCK,&ss,0);
interrupt_handle_pending(context);
break;
interrupt_handle_pending(context);
break;
@@
-313,6
+323,7
@@
call_into_lisp(lispobj fun, lispobj *args, int nargs);
* could be in registers depending on what the compiler likes. So we
* copy the args into a portable vector and let the assembly language
* call-in function figure it out. */
* could be in registers depending on what the compiler likes. So we
* copy the args into a portable vector and let the assembly language
* call-in function figure it out. */
+
lispobj
funcall0(lispobj function)
{
lispobj
funcall0(lispobj function)
{