{
lispobj nuntagged;
long ntotal = HeaderValue(object);
- lispobj layout = ((struct instance *)native_pointer(where))->slots[0];
+ lispobj layout = ((struct instance *)where)->slots[0];
if (!layout)
return 1;
void scan_weak_pointers(void)
{
struct weak_pointer *wp;
- for (wp = weak_pointers; wp != NULL;
- wp=(struct weak_pointer *)native_pointer(wp->next)) {
+ for (wp = weak_pointers; wp != NULL; wp=wp->next) {
lispobj value = wp->value;
lispobj *first_pointer;
gc_assert(widetag_of(wp->header)==WEAK_POINTER_WIDETAG);
return copy_large_object(object, length);
}
-
+/* Doesn't seem to be used, delete it after the grace period. */
+#if 0
static lispobj
trans_unboxed_large(lispobj object)
{
return copy_large_unboxed_object(object, length);
}
+#endif
\f
/*
/* FIXME: What does this mean? */
int gencgc_hash = 1;
-static int
+static long
scav_vector(lispobj *where, lispobj object)
{
unsigned long kv_length;
if (!is_lisp_pointer(where[2])) {
lose("no pointer at %x in hash table", where[2]);
}
- hash_table = (lispobj *)native_pointer(where[2]);
+ hash_table = (struct hash_table *)native_pointer(where[2]);
/*FSHOW((stderr,"/hash_table = %x\n", hash_table));*/
if (widetag_of(hash_table->header) != INSTANCE_HEADER_WIDETAG) {
lose("hash table not instance (%x at %x)",
/* Scavenge hash table, which will fix the positions of the other
* needed objects. */
- scavenge(hash_table, sizeof(struct hash_table) / sizeof(lispobj));
+ scavenge((lispobj *)hash_table,
+ sizeof(struct hash_table) / sizeof(lispobj));
/* Cross-check the kv_vector. */
if (where != (lispobj *)native_pointer(hash_table->table)) {
if (is_lisp_pointer(index_vector_obj) &&
(widetag_of(*(lispobj *)native_pointer(index_vector_obj)) ==
SIMPLE_ARRAY_WORD_WIDETAG)) {
- index_vector = ((lispobj *)native_pointer(index_vector_obj)) + 2;
+ index_vector =
+ ((unsigned long *)native_pointer(index_vector_obj)) + 2;
/*FSHOW((stderr, "/index_vector = %x\n",index_vector));*/
length = fixnum_value(((lispobj *)native_pointer(index_vector_obj))[1]);
/*FSHOW((stderr, "/length = %d\n", length));*/
if (is_lisp_pointer(next_vector_obj) &&
(widetag_of(*(lispobj *)native_pointer(next_vector_obj)) ==
SIMPLE_ARRAY_WORD_WIDETAG)) {
- next_vector = ((lispobj *)native_pointer(next_vector_obj)) + 2;
+ next_vector = ((unsigned long *)native_pointer(next_vector_obj)) + 2;
/*FSHOW((stderr, "/next_vector = %x\n", next_vector));*/
next_vector_length = fixnum_value(((lispobj *)native_pointer(next_vector_obj))[1]);
/*FSHOW((stderr, "/next_vector_length = %d\n", next_vector_length));*/
if (is_lisp_pointer(hash_vector_obj) &&
(widetag_of(*(lispobj *)native_pointer(hash_vector_obj)) ==
SIMPLE_ARRAY_WORD_WIDETAG)){
- hash_vector = ((lispobj *)native_pointer(hash_vector_obj)) + 2;
+ hash_vector =
+ ((unsigned long *)native_pointer(hash_vector_obj)) + 2;
/*FSHOW((stderr, "/hash_vector = %x\n", hash_vector));*/
gc_assert(fixnum_value(((lispobj *)native_pointer(hash_vector_obj))[1])
== next_vector_length);
#ifdef LISP_FEATURE_SB_THREAD
long i,free;
if(th==arch_os_get_current_thread()) {
- esp = (void **) &raise;
+ /* Somebody is going to burn in hell for this, but casting
+ * it in two steps shuts gcc up about strict aliasing. */
+ esp = (void **)((void *)&raise);
} else {
void **esp1;
free=fixnum_value(SymbolValue(FREE_INTERRUPT_CONTEXT_INDEX,th));
for(i=free-1;i>=0;i--) {
os_context_t *c=th->interrupt_contexts[i];
esp1 = (void **) *os_context_register_addr(c,reg_SP);
- if(esp1>=th->control_stack_start&& esp1<th->control_stack_end){
+ if (esp1>=(void **)th->control_stack_start &&
+ esp1<(void **)th->control_stack_end) {
if(esp1<esp) esp=esp1;
for(ptr = (void **)(c+1); ptr>=(void **)c; ptr--) {
preserve_pointer(*ptr);
}
}
#else
- esp = (void **) &raise;
+ esp = (void **)((void *)&raise);
#endif
for (ptr = (void **)th->control_stack_end; ptr > esp; ptr--) {
preserve_pointer(*ptr);
page_table[page].first_object_offset =
(void *)prev - page_address(page);
page++;
- } while (page_address(page) < alloc_ptr);
+ } while ((long)page_address(page) < alloc_ptr);
generations[0].bytes_allocated = PAGE_BYTES*page;
bytes_allocated = PAGE_BYTES*page;
region->free_pointer = page_address(0);
region->end_addr = page_address(0);
}
-
{
/* This is a kludge. It's not actually safe - in general - to use
%primitive print on the alpha, because it skips half of the
- number stack setup that should usually be done on a function call,
- so the called routine (i.e. this one) ends up being able to overwrite
- local variables in the caller. Rather than fix this everywhere
- that %primitive print is used (it's only a debugging aid anyway)
- we just put guarantee our safety by putting an unused buffer on
- the stack before doing anything else here */
- char untouched[32]; /* GCC warns about not using this, but that's the point.. */
+ number stack setup that should usually be done on a function
+ call, so the called routine (i.e. this one) ends up being able
+ to overwrite local variables in the caller. Rather than fix
+ this everywhere that %primitive print is used (it's only a
+ debugging aid anyway) we just guarantee our safety by putting
+ an unused buffer on the stack before doing anything else
+ here */
+ char untouched[32];
fprintf(stderr, "%s\n",
- (char *)(((struct vector *)native_pointer(string))->data),untouched);
+ (char *)(((struct vector *)native_pointer(string))->data));
+ /* shut GCC up about not using this, because that's the point.. */
+ if (untouched);
return NIL;
}
#include <stdio.h>
#include <stdlib.h>
+#include <stdint.h>
#include <string.h>
#include <signal.h>
#include <sys/types.h>
* must obviously exist in reality. That would be post_signal_tramp
*/
- u32 *sp=(u32 *)*os_context_register_addr(context,reg_ESP);
+ uint32_t *sp=(uint32_t *)*os_context_register_addr(context,reg_ESP);
- *(sp-15) = post_signal_tramp; /* return address for call_into_lisp */
+ /* return address for call_into_lisp: */
+ *(sp-15) = (uint32_t)post_signal_tramp;
*(sp-14) = function; /* args for call_into_lisp : function*/
*(sp-13) = 0; /* arg array */
*(sp-12) = 0; /* no. args */
*(sp-1)=*os_context_pc_addr(context);
#elif defined(LISP_FEATURE_X86_64)
- u64 *sp=(u64 *)*os_context_register_addr(context,reg_RSP);
- *(sp-18) = post_signal_tramp; /* return address for call_into_lisp */
+ uint64_t *sp=(uint64_t *)*os_context_register_addr(context,reg_RSP);
+ /* return address for call_into_lisp: */
+ *(sp-18) = (uint64_t)post_signal_tramp;
*(sp-17)=*os_context_register_addr(context,reg_R15);
*(sp-16)=*os_context_register_addr(context,reg_R14);
*(sp-2)=*os_context_register_addr(context,reg_RBP);
*(sp-1)=*os_context_pc_addr(context);
- *os_context_register_addr(context,reg_RDI) = function; /* function */
+ *os_context_register_addr(context,reg_RDI) =
+ (os_context_register_t)function; /* function */
*os_context_register_addr(context,reg_RSI) = 0; /* arg. array */
*os_context_register_addr(context,reg_RDX) = 0; /* no. args */
#else
#endif
#ifdef LISP_FEATURE_X86
- *os_context_pc_addr(context) = call_into_lisp;
+ *os_context_pc_addr(context) = (os_context_register_t)call_into_lisp;
*os_context_register_addr(context,reg_ECX) = 0;
- *os_context_register_addr(context,reg_EBP) = sp-2;
+ *os_context_register_addr(context,reg_EBP) = (os_context_register_t)(sp-2);
#ifdef __NetBSD__
- *os_context_register_addr(context,reg_UESP) = sp-15;
+ *os_context_register_addr(context,reg_UESP) =
+ (os_context_register_t)(sp-15);
#else
- *os_context_register_addr(context,reg_ESP) = sp-15;
+ *os_context_register_addr(context,reg_ESP) = (os_context_register_t)(sp-15);
#endif
#elif defined(LISP_FEATURE_X86_64)
- *os_context_pc_addr(context) = call_into_lisp;
+ *os_context_pc_addr(context) = (os_context_register_t)call_into_lisp;
*os_context_register_addr(context,reg_RCX) = 0;
- *os_context_register_addr(context,reg_RBP) = sp-2;
- *os_context_register_addr(context,reg_RSP) = sp-18;
+ *os_context_register_addr(context,reg_RBP) = (os_context_register_t)(sp-2);
+ *os_context_register_addr(context,reg_RSP) = (os_context_register_t)(sp-18);
#else
/* this much of the calling convention is common to all
non-x86 ports */
- *os_context_pc_addr(context) = code;
+ *os_context_pc_addr(context) = (os_context_register_t)code;
*os_context_register_addr(context,reg_NARGS) = 0;
- *os_context_register_addr(context,reg_LIP) = code;
+ *os_context_register_addr(context,reg_LIP) = (os_context_register_t)code;
*os_context_register_addr(context,reg_CFP) =
- current_control_frame_pointer;
+ (os_context_register_t)current_control_frame_pointer;
#endif
#ifdef ARCH_HAS_NPC_REGISTER
*os_context_npc_addr(context) =
#endif
#ifdef LISP_FEATURE_SPARC
*os_context_register_addr(context,reg_CODE) =
- fun + FUN_POINTER_LOWTAG;
+ (os_context_register_t)(fun + FUN_POINTER_LOWTAG);
#endif
}
get_spinlock(&th->interrupt_fun_lock,(long)th);
c=((struct cons *)native_pointer(th->interrupt_fun));
arrange_return_to_lisp_function(context,c->car);
- th->interrupt_fun=(lispobj *)(c->cdr);
+ th->interrupt_fun=c->cdr;
release_spinlock(&th->interrupt_fun_lock);
}
funcall0(SymbolFunction(UNDEFINED_ALIEN_FUNCTION_ERROR));
}
-boolean handle_guard_page_triggered(os_context_t *context,void *addr){
+boolean handle_guard_page_triggered(os_context_t *context,os_vm_address_t addr)
+{
struct thread *th=arch_os_get_current_thread();
/* note the os_context hackery here. When the signal handler returns,
extern void interrupt_handle_pending(os_context_t*);
extern void interrupt_internal_error(int, siginfo_t*, os_context_t*,
boolean continuable);
-extern boolean handle_guard_page_triggered(os_context_t *,void *);
+extern boolean handle_guard_page_triggered(os_context_t *,os_vm_address_t);
extern boolean interrupt_maybe_gc(int, siginfo_t*, void*);
extern boolean interrupt_maybe_gc_int(int, siginfo_t *, void *);
extern boolean maybe_defer_handler(void *handler, struct interrupt_data *data,
#define ARE_SAME_HANDLER(x, y) ((void*)(x) == (void*)(y))
#endif
-
#include "validate.h"
#include "thread.h"
+#include "gc.h"
+#if defined LISP_FEATURE_GENCGC
+#include "gencgc-internal.h"
+#endif
+
size_t os_vm_page_size;
#ifdef LISP_FEATURE_SB_THREAD
int, op,
int, val,
struct timespec *, rel);
+
+int
+futex_wait(int *lock_word, int oldval)
+{
+ int t= sys_futex(lock_word,FUTEX_WAIT,oldval, 0);
+ return t;
+}
+
+int
+futex_wake(int *lock_word, int n)
+{
+ return sys_futex(lock_word,FUTEX_WAKE,n,0);
+}
#endif
-#include "gc.h"
\f
int linux_sparc_siginfo_bug = 0;
int linux_no_threads_p = 0;
sig_stop_for_gc_handler);
#endif
}
-
-#ifdef LISP_FEATURE_SB_THREAD
-int
-futex_wait(int *lock_word, int oldval)
-{
- int t= sys_futex(lock_word,FUTEX_WAIT,oldval, 0);
- return t;
-}
-
-int
-futex_wake(int *lock_word, int n)
-{
- return sys_futex(lock_word,FUTEX_WAKE,n,0);
-}
-#endif
#include "sbcl.h"
#include "runtime.h"
+#include "parse.h"
+#include "vars.h"
/* Almost all of this file can be skipped if we're not supporting LDB. */
#if defined(LISP_FEATURE_SB_LDB)
char **ptr;
{
char *token = parse_token(ptr);
- long result;
+ lispobj result;
if (token == NULL) {
printf("expected an address\n");
throw_to_monitor();
}
else if (token[0] == '$') {
- if (!lookup_variable(token+1, (lispobj *)&result)) {
+ if (!lookup_variable(token+1, &result)) {
printf("unknown variable: ``%s''\n", token);
throw_to_monitor();
}
result &= ~7;
}
else {
- if (!string_to_long(token, &result)) {
+ long value;
+ if (!string_to_long(token, &value)) {
printf("invalid number: ``%s''\n", token);
throw_to_monitor();
}
- result &= ~3;
+ result = (value & ~3);
}
if (!is_valid_lisp_addr((os_vm_address_t)result)) {
- printf("invalid Lisp-level address: 0x%lx\n", result);
+ printf("invalid Lisp-level address: %p\n", (void *)result);
throw_to_monitor();
}
char *token = parse_token(ptr);
long pointer;
lispobj result;
+ long value;
if (token == NULL) {
printf("expected an object\n");
throw_to_monitor();
}
}
- else if (string_to_long(token, (long *)&result))
- ;
+ else if (string_to_long(token, &value))
+ result = value;
else if (lookup_symbol(token, &result))
;
else {
case FUNCALLABLE_INSTANCE_HEADER_WIDETAG:
if ((long)pointer != ((long)start_addr+FUN_POINTER_LOWTAG)) {
if (pointer_filter_verbose) {
- fprintf(stderr,"*Wf2: %x %x %x\n",
- (unsigned long) pointer,
- (unsigned long) start_addr, *start_addr);
+ fprintf(stderr,"*Wf2: %p %p %p\n",
+ pointer, start_addr, (void *)*start_addr);
}
return 0;
}
break;
default:
if (pointer_filter_verbose) {
- fprintf(stderr,"*Wf3: %x %x %x\n", (unsigned long) pointer,
- (unsigned long) start_addr, *start_addr);
+ fprintf(stderr,"*Wf3: %p %p %p\n",
+ pointer, start_addr, (void *)*start_addr);
}
return 0;
}
case LIST_POINTER_LOWTAG:
if ((long)pointer != ((long)start_addr+LIST_POINTER_LOWTAG)) {
if (pointer_filter_verbose)
- fprintf(stderr,"*Wl1: %x %x %x\n", (unsigned long) pointer,
- (unsigned long) start_addr, *start_addr);
+ fprintf(stderr,"*Wl1: %p %p %p\n",
+ pointer, start_addr, (void *)*start_addr);
return 0;
}
/* Is it plausible cons? */
break;
} else {
if (pointer_filter_verbose) {
- fprintf(stderr,"*Wl2: %x %x %x\n", (unsigned long) pointer,
- (unsigned long) start_addr, *start_addr);
+ fprintf(stderr,"*Wl2: %p %p %p\n",
+ pointer, start_addr, (void *)*start_addr);
}
return 0;
}
case INSTANCE_POINTER_LOWTAG:
if ((long)pointer != ((long)start_addr+INSTANCE_POINTER_LOWTAG)) {
if (pointer_filter_verbose) {
- fprintf(stderr,"*Wi1: %x %x %x\n", (unsigned long) pointer,
- (unsigned long) start_addr, *start_addr);
+ fprintf(stderr,"*Wi1: %p %p %p\n",
+ pointer, start_addr, (void *)*start_addr);
}
return 0;
}
if (widetag_of(start_addr[0]) != INSTANCE_HEADER_WIDETAG) {
if (pointer_filter_verbose) {
- fprintf(stderr,"*Wi2: %x %x %x\n", (unsigned long) pointer,
- (unsigned long) start_addr, *start_addr);
+ fprintf(stderr,"*Wi2: %p %p %p\n",
+ pointer, start_addr, (void *)*start_addr);
}
return 0;
}
case OTHER_POINTER_LOWTAG:
if ((long)pointer != ((long)start_addr+OTHER_POINTER_LOWTAG)) {
if (pointer_filter_verbose) {
- fprintf(stderr,"*Wo1: %x %x %x\n", (unsigned long) pointer,
- (unsigned long) start_addr, *start_addr);
+ fprintf(stderr,"*Wo1: %p %p %p\n",
+ pointer, start_addr, (void *)*start_addr);
}
return 0;
}
/* Is it plausible? Not a cons. XXX should check the headers. */
if (is_lisp_pointer(start_addr[0]) || ((start_addr[0] & FIXNUM_TAG_MASK) == 0)) {
if (pointer_filter_verbose) {
- fprintf(stderr,"*Wo2: %x %x %x\n", (unsigned long) pointer,
- (unsigned long) start_addr, *start_addr);
+ fprintf(stderr,"*Wo2: %p %p %p\n",
+ pointer, start_addr, (void *)*start_addr);
}
return 0;
}
case SINGLE_FLOAT_WIDETAG:
#endif
if (pointer_filter_verbose) {
- fprintf(stderr,"*Wo3: %x %x %x\n", (unsigned long) pointer,
- (unsigned long) start_addr, *start_addr);
+ fprintf(stderr,"*Wo3: %p %p %p\n",
+ pointer, start_addr, (void *)*start_addr);
}
return 0;
case CLOSURE_HEADER_WIDETAG:
case FUNCALLABLE_INSTANCE_HEADER_WIDETAG:
if (pointer_filter_verbose) {
- fprintf(stderr,"*Wo4: %x %x %x\n", (unsigned long) pointer,
- (unsigned long) start_addr, *start_addr);
+ fprintf(stderr,"*Wo4: %p %p %p\n",
+ pointer, start_addr, (void *)*start_addr);
}
return 0;
case INSTANCE_HEADER_WIDETAG:
if (pointer_filter_verbose) {
- fprintf(stderr,"*Wo5: %x %x %x\n", (unsigned long) pointer,
- (unsigned long) start_addr, *start_addr);
+ fprintf(stderr,"*Wo5: %p %p %p\n",
+ pointer, start_addr, (void *)*start_addr);
}
return 0;
default:
if (pointer_filter_verbose) {
- fprintf(stderr,"*Wo6: %x %x %x\n", (unsigned long) pointer,
- (unsigned long) start_addr, *start_addr);
+ fprintf(stderr,"*Wo6: %p %p %p\n",
+ pointer, start_addr, (void *)*start_addr);
}
return 0;
}
break;
default:
if (pointer_filter_verbose) {
- fprintf(stderr,"*W?: %x %x %x\n", (unsigned long) pointer,
- (unsigned long) start_addr, *start_addr);
+ fprintf(stderr,"*W?: %p %p %p\n",
+ pointer, start_addr, (void *)*start_addr);
}
return 0;
}
}
}
if (pointer_filter_verbose) {
- fprintf(stderr, "number of valid stack pointers = %d\n",
+ fprintf(stderr, "number of valid stack pointers = %ld\n",
num_valid_stack_locations);
- fprintf(stderr, "number of stack return addresses = %d\n",
+ fprintf(stderr, "number of stack return addresses = %ld\n",
num_valid_stack_ra_locations);
}
}
lispobj code_obj = (lispobj)valid_stack_ra_code_objects[i];
pscav(&code_obj, 1, 0);
if (pointer_filter_verbose) {
- fprintf(stderr,"*C moved RA %x to %x; for code object %x to %x\n",
- *valid_stack_ra_locations[i],
- (long)(*valid_stack_ra_locations[i])
- - ((long)valid_stack_ra_code_objects[i] - (long)code_obj),
- (unsigned long) valid_stack_ra_code_objects[i], code_obj);
+ fprintf(stderr,"*C moved RA %p to %p; for code object %p to %p\n",
+ (void *)*valid_stack_ra_locations[i],
+ (void *)(*valid_stack_ra_locations[i]) -
+ ((void *)valid_stack_ra_code_objects[i] -
+ (void *)code_obj),
+ valid_stack_ra_code_objects[i], (void *)code_obj);
}
*valid_stack_ra_locations[i] =
((long)(*valid_stack_ra_locations[i])
}
#endif
+
+#if defined(LISP_FEATURE_X86) || defined(LISP_FEATURE_X86_64)
+extern lispobj call_into_lisp_first_time(lispobj fun, lispobj *args, int nargs);
+#endif
+
int
initial_thread_trampoline(struct thread *th)
{
#if defined(LISP_FEATURE_X86) || defined(LISP_FEATURE_X86_64)
lispobj *args = NULL;
#endif
-
function = th->unbound_marker;
th->unbound_marker = UNBOUND_MARKER_WIDETAG;
if(arch_os_thread_init(th)==0) return 1;
#ifdef LISP_FEATURE_SB_THREAD
+#ifndef __USE_XOPEN2K
+extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
+ size_t __stacksize);
+#endif
+
boolean create_os_thread(struct thread *th,os_thread_t *kid_tid)
{
/* The new thread inherits the restrictive signal mask set here,
void reap_dead_thread(struct thread *th)
{
if(th->state!=STATE_DEAD)
- lose("thread %lx is not joinable, state=%d\n",th,th->state);
+ lose("thread %p is not joinable, state=%d\n",th,th->state);
#ifdef LISP_FEATURE_GENCGC
{
sigset_t newset,oldset;
* interrupt_fun data for exactly as many signals as are
* going to be received by the destination thread.
*/
- struct cons *c=alloc_cons(function,NIL);
+ lispobj c=alloc_cons(function,NIL);
int kill_status;
/* interrupt_thread_handler locks this spinlock with
* interrupts blocked and it does so for the sake of
#define _INCLUDE_VALIDATE_H_
#ifndef LISP_FEATURE_GENCGC
+/* FIXME: genesis/constants.h also defines this with a constant value */
#define DYNAMIC_SPACE_START current_dynamic_space
#endif
-#define BINDING_STACK_SIZE (1024*1024) /* chosen at random */
-#define THREAD_CONTROL_STACK_SIZE (2*1024*1024) /* eventually choosable per-thread */
+#define BINDING_STACK_SIZE (1024*1024) /* chosen at random */
+/* eventually choosable per-thread: */
+#define THREAD_CONTROL_STACK_SIZE (2*1024*1024)
/* constants derived from the fundamental constants in passed by GENESIS */
#ifdef LISP_FEATURE_GENCGC
-#define DYNAMIC_SPACE_SIZE (DYNAMIC_SPACE_END - DYNAMIC_SPACE_START)
+#define DYNAMIC_SPACE_SIZE (DYNAMIC_SPACE_END - DYNAMIC_SPACE_START)
#else
-#define DYNAMIC_SPACE_SIZE (DYNAMIC_0_SPACE_END - DYNAMIC_0_SPACE_START)
+#define DYNAMIC_SPACE_SIZE (DYNAMIC_0_SPACE_END - DYNAMIC_0_SPACE_START)
#endif
-#define READ_ONLY_SPACE_SIZE (READ_ONLY_SPACE_END - READ_ONLY_SPACE_START)
-#define STATIC_SPACE_SIZE (STATIC_SPACE_END - STATIC_SPACE_START)
+#define READ_ONLY_SPACE_SIZE (READ_ONLY_SPACE_END - READ_ONLY_SPACE_START)
+#define STATIC_SPACE_SIZE (STATIC_SPACE_END - STATIC_SPACE_START)
#ifdef LISP_FEATURE_LINKAGE_TABLE
-#define LINKAGE_TABLE_SPACE_SIZE (LINKAGE_TABLE_SPACE_END - LINKAGE_TABLE_SPACE_START)
+#define LINKAGE_TABLE_SPACE_SIZE \
+ (LINKAGE_TABLE_SPACE_END - LINKAGE_TABLE_SPACE_START)
#endif
#if !defined(LANGUAGE_ASSEMBLY)
#include <thread.h>
#ifdef LISP_FEATURE_STACK_GROWS_DOWNWARD_NOT_UPWARD
-#define CONTROL_STACK_GUARD_PAGE(th) ((void *)(th->control_stack_start))
-#define CONTROL_STACK_RETURN_GUARD_PAGE(th) (CONTROL_STACK_GUARD_PAGE(th) + os_vm_page_size)
+#define CONTROL_STACK_GUARD_PAGE(th) \
+ ((os_vm_address_t)(th->control_stack_start))
+#define CONTROL_STACK_RETURN_GUARD_PAGE(th) \
+ (CONTROL_STACK_GUARD_PAGE(th) + os_vm_page_size)
#else
-#define CONTROL_STACK_GUARD_PAGE(th) (((void *)(th->control_stack_end)) - os_vm_page_size)
-#define CONTROL_STACK_RETURN_GUARD_PAGE(th) (CONTROL_STACK_GUARD_PAGE(th) - os_vm_page_size)
+#define CONTROL_STACK_GUARD_PAGE(th) \
+ (((os_vm_address_t)(th->control_stack_end)) - os_vm_page_size)
+#define CONTROL_STACK_RETURN_GUARD_PAGE(th) \
+ (CONTROL_STACK_GUARD_PAGE(th) - os_vm_page_size)
#endif
extern void validate(void);
*/
\f
#define LANGUAGE_ASSEMBLY
-#include "validate.h"
#include "sbcl.h"
+#include "validate.h"
#include "genesis/closure.h"
#include "genesis/fdefn.h"
#include "genesis/static-symbols.h"
struct thread *debug_get_fs() {
register u32 fs;
__asm__ __volatile__ ("movl %%fs,%0" : "=r" (fs) : );
- return fs;
+ return (struct thread *)fs;
}
/* free any arch/os-specific resources used by thread, which is now
os_flush_icache(os_vm_address_t address, os_vm_size_t length)
{
}
-
#define _X86_LINUX_OS_H
typedef struct ucontext os_context_t;
-typedef long os_context_register_t;
+typedef greg_t os_context_register_t;
static inline os_context_t *arch_os_get_context(void **void_context) {
return (os_context_t *) *void_context;
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.3.16"
+"0.9.3.17"