From bb8e97c115fdcb694122a389275432b2636e9549 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Thu, 17 May 2018 11:14:51 +0300 Subject: Hide and rename GC_dirty to GC_dirty_async[_inner] (code refactoring) Also, do not call GC_dirty_async_inner unless GC_incremental. * include/private/gc_priv.h [MANUAL_VDB] (GC_dirty_async_inner): Declare GC_INNER function. * include/private/gc_priv.h (GC_dirty_async): New macro (calls GC_dirty_async_inner if MANUAL_VDB and GC_incremental. * mallocx.c [MANUAL_VDB] (GC_dirty): Remove declaration. * mark.c [MANUAL_VDB && THREADS] (GC_dirty): Likewise. * mallocx.c (GC_end_stubborn_change): Remove GC_ATTR_UNUSED; call GC_dirty_async (unconditionally) instead of GC_dirty. * mark.c [THREADS] (GC_mark_and_push_stack): Call GC_dirty_async instead of GC_dirty. * os_dep.c [MANUAL_VDB] (GC_dirty): Rename to GC_dirty_async_inner; add GC_INNER; change argument type from ptr_t to const void*. --- mallocx.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'mallocx.c') diff --git a/mallocx.c b/mallocx.c index f9376836..b4ee570c 100644 --- a/mallocx.c +++ b/mallocx.c @@ -611,13 +611,7 @@ GC_API void GC_CALL GC_change_stubborn(const void *p GC_ATTR_UNUSED) /* Empty. */ } -#if defined(MANUAL_VDB) - void GC_dirty(ptr_t p); -#endif - -GC_API void GC_CALL GC_end_stubborn_change(const void *p GC_ATTR_UNUSED) +GC_API void GC_CALL GC_end_stubborn_change(const void *p) { -# ifdef MANUAL_VDB - GC_dirty((ptr_t)p); -# endif + GC_dirty_async(p); /* entire object */ } -- cgit v1.2.1