From 6439f7121b3a75d48d0db2e75c663de754a84c9c Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 25 Aug 2014 21:24:16 -0700 Subject: * gc.c (top): Renamed to gc_prot_top, turned extern. (prot1, rel1, mark): Follow rename. * gc.h (gc_prot_top): Declared. * signal.h (extended_jmp_buf): New member, gc_pt. (extended_setjmp): Save and restore gc_prot_top. --- gc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gc.c') diff --git a/gc.c b/gc.c index 5fdbdf4b..9d5b61b9 100644 --- a/gc.c +++ b/gc.c @@ -69,7 +69,7 @@ static val *gc_stack_bottom; static val *prot_stack[PROT_STACK_SIZE]; static val **prot_stack_limit = prot_stack + PROT_STACK_SIZE; -static val **top = prot_stack; +val **gc_prot_top = prot_stack; static val free_list, *free_tail = &free_list; static heap_t *heap_list; @@ -95,16 +95,16 @@ val break_obj; val prot1(val *loc) { - assert (top < prot_stack_limit); + assert (gc_prot_top < prot_stack_limit); assert (loc != 0); - *top++ = loc; + *gc_prot_top++ = loc; return nil; /* for use in macros */ } void rel1(val *loc) { /* protect and release calls must nest. */ - if (*--top != loc) + if (*--gc_prot_top != loc) abort(); } @@ -401,7 +401,7 @@ static void mark(mach_context_t *pmc, val *gc_stack_top) /* * First, scan the officially registered locations. */ - for (rootloc = prot_stack; rootloc != top; rootloc++) + for (rootloc = prot_stack; rootloc != gc_prot_top; rootloc++) mark_obj(**rootloc); #if CONFIG_GEN_GC -- cgit v1.2.3