projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
don't close runtime dlhandle on Darwin
[sbcl.git]
/
src
/
runtime
/
parse.c
diff --git
a/src/runtime/parse.c
b/src/runtime/parse.c
index
62a0f59
..
66292af
100644
(file)
--- a/
src/runtime/parse.c
+++ b/
src/runtime/parse.c
@@
-12,10
+12,15
@@
*/
#include <stdio.h>
*/
#include <stdio.h>
+#include <stdlib.h>
#include <ctype.h>
#include <ctype.h>
-#include <signal.h>
#include "sbcl.h"
#include "sbcl.h"
+#if defined(LISP_FEATURE_WIN32) && defined(LISP_FEATURE_SB_THREAD)
+#include "pthreads_win32.h"
+#else
+#include <signal.h>
+#endif
#include "runtime.h"
#if defined(LISP_FEATURE_SB_LDB)
#include "runtime.h"
#if defined(LISP_FEATURE_SB_LDB)
@@
-31,6
+36,7
@@
#include "arch.h"
#include "search.h"
#include "thread.h"
#include "arch.h"
#include "search.h"
#include "thread.h"
+#include "pseudo-atomic.h"
#include "genesis/simple-fun.h"
#include "genesis/fdefn.h"
#include "genesis/simple-fun.h"
#include "genesis/fdefn.h"
@@
-259,13
+265,14
@@
static boolean lookup_symbol(char *name, lispobj *result)
}
/* Search dynamic space. */
}
/* Search dynamic space. */
-#ifndef LISP_FEATURE_GENCGC
+#if defined(LISP_FEATURE_GENCGC)
+ headerptr = (lispobj *)DYNAMIC_SPACE_START;
+ count = (lispobj *)get_alloc_pointer() - headerptr;
+#else
headerptr = (lispobj *)current_dynamic_space;
count = dynamic_space_free_pointer - headerptr;
headerptr = (lispobj *)current_dynamic_space;
count = dynamic_space_free_pointer - headerptr;
-#else
- headerptr = (lispobj *)DYNAMIC_SPACE_START;
- count = ((lispobj *)SymbolValue(ALLOCATION_POINTER,0)) - headerptr;
#endif
#endif
+
if (search_for_symbol(name, &headerptr, &count)) {
*result = make_lispobj(headerptr, OTHER_POINTER_LOWTAG);
return 1;
if (search_for_symbol(name, &headerptr, &count)) {
*result = make_lispobj(headerptr, OTHER_POINTER_LOWTAG);
return 1;
@@
-318,18
+325,18
@@
char **ptr;
throw_to_monitor();
} else if (token[0] == '$') {
if (isalpha(token[1])) {
throw_to_monitor();
} else if (token[0] == '$') {
if (isalpha(token[1])) {
- int free;
+ int free_ici;
int regnum;
os_context_t *context;
int regnum;
os_context_t *context;
- free = SymbolValue(FREE_INTERRUPT_CONTEXT_INDEX,thread)>>2;
+ free_ici = fixnum_value(SymbolValue(FREE_INTERRUPT_CONTEXT_INDEX,thread));
- if (free == 0) {
+ if (free_ici == 0) {
printf("Variable ``%s'' is not valid -- there is no current interrupt context.\n", token);
throw_to_monitor();
}
printf("Variable ``%s'' is not valid -- there is no current interrupt context.\n", token);
throw_to_monitor();
}
- context = thread->interrupt_contexts[free - 1];
+ context = thread->interrupt_contexts[free_ici - 1];
regnum = parse_regnum(token);
if (regnum < 0) {
regnum = parse_regnum(token);
if (regnum < 0) {