Skip to content

Commit

Permalink
Conditionally compile buffered finalization
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-hughes committed Aug 8, 2024
1 parent 23c20aa commit 5f21e15
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/gc/gc_disclaim.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ GC_API GC_ATTR_MALLOC GC_ATTR_ALLOC_SIZE(1) void * GC_CALL
const struct GC_finalizer_closure * /* fc */) GC_ATTR_NONNULL(2);


#ifdef BUFFERED_FINALIZATION
/* This API is defined only if the library has been suitably compiled */
/* (i.e. with ENABLE_DISCLAIM defined). */

Expand Down Expand Up @@ -105,6 +106,8 @@ GC_API void GC_CALL GC_finalize_objects(void);

GC_API size_t GC_finalized_total(void);

#endif

#ifdef __cplusplus
} /* extern "C" */
#endif
Expand Down
4 changes: 4 additions & 0 deletions misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
# include <floss.h>
#endif

#ifdef BUFFERED_FINALIZATION
# include "gc/gc_disclaim.h"
#endif

#ifdef THREADS
# ifdef PCR
# include "il/PCR_IL.h"
Expand Down

0 comments on commit 5f21e15

Please sign in to comment.