UNLOCK();
}
+GC_API void GC_CALL GC_register_disclaim_proc(int kind, GC_disclaim_proc proc,
+ void *cd,
+ int mark_unconditionally)
+{
+ GC_ASSERT((unsigned)kind < MAXOBJKINDS);
+ GC_obj_kinds[kind].ok_disclaim_proc = proc;
+ GC_obj_kinds[kind].ok_disclaim_cd = cd;
+ GC_obj_kinds[kind].ok_mark_unconditionally = (GC_bool)mark_unconditionally;
+}
+
#ifdef THREAD_LOCAL_ALLOC
STATIC void * GC_core_finalized_malloc(size_t lb,
const struct GC_finalizer_closure *fclos)
#include "private/gc_pmark.h"
-#ifdef ENABLE_DISCLAIM
-# include "gc_disclaim.h"
-#endif
-
#include <stdio.h>
#include <limits.h>
#include <stdarg.h>
}
GC_API unsigned GC_CALL GC_new_kind_inner(void **fl, GC_word descr,
- int adjust, int clear)
+ int adjust, int clear)
{
unsigned result = GC_n_kinds++;
return result;
}
-#ifdef ENABLE_DISCLAIM
- GC_API void GC_CALL GC_register_disclaim_proc(int kind,
- GC_disclaim_proc proc,
- void *cd,
- int mark_unconditionally)
- {
- GC_obj_kinds[kind].ok_disclaim_proc = proc;
- GC_obj_kinds[kind].ok_disclaim_cd = cd;
- GC_obj_kinds[kind].ok_mark_unconditionally = (GC_bool)mark_unconditionally;
- }
-#endif /* ENABLE_DISCLAIM */
-
GC_API void * GC_CALL GC_call_with_stack_base(GC_stack_base_func fn, void *arg)
{
int dummy;