mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 03:30:27 +02:00
whippet: avoid an atomic load when visiting already-marked objects
This commit is contained in:
parent
d50455ed1b
commit
ff1e1b1d44
1 changed files with 2 additions and 1 deletions
|
@ -678,7 +678,8 @@ static inline int trace_edge(struct gc_heap *heap, struct gc_edge edge) {
|
|||
struct gc_ref ref = gc_edge_ref(edge);
|
||||
int is_new = do_trace(heap, edge, ref);
|
||||
|
||||
if (GC_UNLIKELY(atomic_load_explicit(&heap->check_pending_ephemerons,
|
||||
if (is_new &&
|
||||
GC_UNLIKELY(atomic_load_explicit(&heap->check_pending_ephemerons,
|
||||
memory_order_relaxed)))
|
||||
gc_resolve_pending_ephemerons(ref, heap);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue