Skip to content
globals.c 1.64 KiB
Newer Older
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/globals.c,v 1.5 2005/09/15 18:26:51 rtoy Rel $ */
wlott's avatar
wlott committed

/* Variables everybody needs to look at or frob on. */

#include <stdio.h>

#include "lisp.h"
#include "internals.h"
#include "globals.h"

int foreign_function_call_active;

lispobj *current_control_stack_pointer;
lispobj *current_control_frame_pointer;
wlott's avatar
wlott committed
#ifndef BINDING_STACK_POINTER
lispobj *current_binding_stack_pointer;
#endif

lispobj *read_only_space;
lispobj *static_space;
lispobj *dynamic_0_space;
lispobj *dynamic_1_space;
unsigned dynamic_space_size;
wlott's avatar
wlott committed
lispobj *control_stack;
Raymond Toy's avatar
Raymond Toy committed

cwang's avatar
cwang committed
#if (defined(i386) || defined(__x86_64))
ram's avatar
ram committed
lispobj *control_stack_end;
#endif
wlott's avatar
wlott committed
lispobj *binding_stack;

lispobj *current_dynamic_space;
wlott's avatar
wlott committed
#ifndef ALLOCATION_POINTER
lispobj *current_dynamic_space_free_pointer;
#endif
#ifndef INTERNAL_GC_TRIGGER
lispobj *current_auto_gc_trigger;
#endif

Raymond Toy's avatar
Raymond Toy committed
unsigned long read_only_space_size;
unsigned long binding_stack_size;
unsigned long static_space_size;
unsigned long control_stack_size;


wlott's avatar
wlott committed
{
    /* Space, stack, and free pointer vars are initialized by
       validate() and coreparse(). */

#ifndef INTERNAL_GC_TRIGGER
    /* No GC trigger yet */
    current_auto_gc_trigger = NULL;
#endif

    /* Set foreign function call active. */
    foreign_function_call_active = 1;

    /* Initialize the current lisp state. */
cwang's avatar
cwang committed
#if !(defined(i386) || defined(__x86_64))
wlott's avatar
wlott committed
    current_control_stack_pointer = control_stack;
ram's avatar
ram committed
#else
    current_control_stack_pointer = control_stack_end;
#endif

    current_control_frame_pointer = (lispobj *) 0;
wlott's avatar
wlott committed
#ifndef BINDING_STACK_POINTER
    current_binding_stack_pointer = binding_stack;
#endif
}