Changeset 825


Ignore:
Timestamp:
Jun 5, 2004, 10:59:42 PM (20 years ago)
Author:
Gary Byers
Message:

New post-gc freeing mechanism (suspened thread may own malloc lock.)

Location:
trunk/ccl/lisp-kernel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/lisp-kernel/gc.c

    r619 r825  
    18921892}
    18931893     
    1894      
     1894
     1895void *postGCptrs = NULL;
     1896
     1897void
     1898postGCfree(void *p)
     1899{
     1900  *(void **)p = postGCptrs;
     1901  postGCptrs = p;
     1902}
     1903
     1904void
     1905freeGCptrs()
     1906{
     1907  void *p, *next;
     1908
     1909  for (p = postGCptrs; p; p = next) {
     1910    next = *((void **)p);
     1911    free(p);
     1912  }
     1913  postGCptrs = NULL;
     1914}
     1915
    18951916void
    18961917reap_gcable_ptrs()
     
    19201941
    19211942        case xmacptr_flag_ptr:
    1922           deallocate((char *)ptr_from_lispobj(ptr));
     1943          postGCfree((void *)ptr_from_lispobj(ptr));
    19231944          break;
    19241945
  • trunk/ccl/lisp-kernel/gc.h

    r557 r825  
    4848void mark_locative_root(LispObj);
    4949void rmark(LispObj);
     50void postGCfree(void *);
    5051LispObj *skip_over_ivector(LispObj, LispObj);
    5152void mark_simple_area_range(LispObj *,LispObj *);
  • trunk/ccl/lisp-kernel/lisp-exceptions.c

    r756 r825  
    831831gc_from_xp(ExceptionInformation *xp)
    832832{
    833   return gc_like_from_xp(xp, gc_from_tcr);
     833  int status = gc_like_from_xp(xp, gc_from_tcr);
     834
     835  freeGCptrs();
     836  return status;
    834837}
    835838
Note: See TracChangeset for help on using the changeset viewer.