Renamed macro

This commit is contained in:
Justin Ethier 2016-04-01 21:03:40 -04:00
parent dd4eba97a6
commit 0da8dabc5a
2 changed files with 5 additions and 5 deletions

6
gc.c
View file

@ -1265,15 +1265,15 @@ void gc_thread_data_init(gc_thread_data *thd, int mut_num, char *stack_base, lon
{ {
char stack_ref; char stack_ref;
thd->stack_start = stack_base; thd->stack_start = stack_base;
#if STACK_GROWS_DOWNWARD #if STACK_GROWTH_IS_DOWNWARD
thd->stack_limit = stack_base - stack_size; thd->stack_limit = stack_base - stack_size;
#else #else
thd->stack_limit = stack_base + stack_size; thd->stack_limit = stack_base + stack_size;
#endif #endif
if (check_overflow(stack_base, &stack_ref)){ if (check_overflow(stack_base, &stack_ref)){
fprintf(stderr, fprintf(stderr,
"Error: recompile with STACK_GROWS_DOWNWARD set to %d\n", "Error: Stack is growing in the wrong direction! Rebuild with STACK_GROWTH_IS_DOWNWARD changed to %d\n",
(1 - STACK_GROWS_DOWNWARD)); (1 - STACK_GROWTH_IS_DOWNWARD));
exit(1); exit(1);
} }
thd->stack_traces = calloc(MAX_STACK_TRACES, sizeof(char *)); thd->stack_traces = calloc(MAX_STACK_TRACES, sizeof(char *));

View file

@ -22,7 +22,7 @@
#define NUM_GC_ANS 128 #define NUM_GC_ANS 128
// Which way does the CPU grow its stack? // Which way does the CPU grow its stack?
#define STACK_GROWS_DOWNWARD 1 #define STACK_GROWTH_IS_DOWNWARD 1
// Size of the stack buffer, in bytes. // Size of the stack buffer, in bytes.
// This is used as the first generation of the GC. // This is used as the first generation of the GC.
@ -159,7 +159,7 @@ typedef enum { STAGE_CLEAR_OR_MARKING
typedef long tag_type; typedef long tag_type;
/* Determine if stack has overflowed */ /* Determine if stack has overflowed */
#if STACK_GROWS_DOWNWARD #if STACK_GROWTH_IS_DOWNWARD
#define check_overflow(x,y) ((x) < (y)) #define check_overflow(x,y) ((x) < (y))
#else #else
#define check_overflow(x,y) ((x) > (y)) #define check_overflow(x,y) ((x) > (y))