diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2018-05-17 11:14:51 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2018-05-17 11:15:40 +0300 |
commit | bb8e97c115fdcb694122a389275432b2636e9549 (patch) | |
tree | bb0c4470e923e0371e3ed338f8fbe427bfdda108 /mark.c | |
parent | 888b7da8d2c504ab0f5d0163a58c6e29f5f86f22 (diff) | |
download | bdwgc-bb8e97c115fdcb694122a389275432b2636e9549.tar.gz |
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*.
Diffstat (limited to 'mark.c')
-rw-r--r-- | mark.c | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -1463,10 +1463,6 @@ GC_API struct GC_ms_entry * GC_CALL GC_mark_and_push(void *obj, return mark_stack_ptr; } -#if defined(MANUAL_VDB) && defined(THREADS) - void GC_dirty(ptr_t p); -#endif - /* Mark and push (i.e. gray) a single object p onto the main */ /* mark stack. Consider p to be valid if it is an interior */ /* pointer. */ @@ -1497,10 +1493,10 @@ GC_API struct GC_ms_entry * GC_CALL GC_mark_and_push(void *obj, GC_ADD_TO_BLACK_LIST_NORMAL(p, source); return; } -# if defined(MANUAL_VDB) && defined(THREADS) +# ifdef THREADS /* Pointer is on the stack. We may have dirtied the object */ - /* it points to, but not yet have called GC_dirty(); */ - GC_dirty(p); /* Implicitly affects entire object. */ + /* it points to, but have not called GC_dirty yet. */ + GC_dirty_async(p); /* entire object */ # endif PUSH_CONTENTS_HDR(r, GC_mark_stack_top, GC_mark_stack_limit, source, hhdr, FALSE); |