#include <ctype.h>
#include <signal.h>
-#include "runtime.h"
#include "sbcl.h"
+#include "runtime.h"
#if defined(LISP_FEATURE_SB_LDB)
#include "interrupt.h"
#include "lispregs.h"
#include "monitor.h"
+#include "validate.h"
#include "arch.h"
#include "search.h"
+#include "thread.h"
#include "genesis/simple-fun.h"
#include "genesis/fdefn.h"
/* Search static space. */
headerptr = (lispobj *)STATIC_SPACE_START;
count =
- (lispobj *)SymbolValue(STATIC_SPACE_FREE_POINTER) -
+ (lispobj *)SymbolValue(STATIC_SPACE_FREE_POINTER,0) -
(lispobj *)STATIC_SPACE_START;
if (search_for_symbol(name, &headerptr, &count)) {
*result = make_lispobj(headerptr,OTHER_POINTER_LOWTAG);
}
/* Search dynamic space. */
- headerptr = (lispobj *)DYNAMIC_SPACE_START;
-#if !defined(__i386__)
- count =
- dynamic_space_free_pointer -
- (lispobj *)DYNAMIC_SPACE_START;
+#ifndef LISP_FEATURE_GENCGC
+ headerptr = (lispobj *)current_dynamic_space;
+ count = dynamic_space_free_pointer - headerptr;
#else
- count =
- (lispobj *)SymbolValue(ALLOCATION_POINTER) -
- (lispobj *)DYNAMIC_SPACE_START;
+ headerptr = (lispobj *)DYNAMIC_SPACE_START;
+ count = ((lispobj *)SymbolValue(ALLOCATION_POINTER,0)) - headerptr;
#endif
if (search_for_symbol(name, &headerptr, &count)) {
*result = make_lispobj(headerptr, OTHER_POINTER_LOWTAG);
for (i = 0; i < NREGS ; i++)
if (strcasecmp(s + 1, lisp_register_names[i]) == 0)
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
return i*2;
#else
return i;
lispobj parse_lispobj(ptr)
char **ptr;
{
+ struct thread *thread=arch_os_get_current_thread();
char *token = parse_token(ptr);
long pointer;
lispobj result;
int regnum;
os_context_t *context;
- free = SymbolValue(FREE_INTERRUPT_CONTEXT_INDEX)>>2;
+ free = SymbolValue(FREE_INTERRUPT_CONTEXT_INDEX,thread)>>2;
if (free == 0) {
printf("Variable ``%s'' is not valid -- there is no current interrupt context.\n", token);
throw_to_monitor();
}
- context = lisp_interrupt_contexts[free - 1];
+ context = thread->interrupt_contexts[free - 1];
regnum = parse_regnum(token);
if (regnum < 0) {