diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2022-08-04 09:28:42 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2022-08-04 09:28:42 +0300 |
commit | e717f1191ba099d46a4eb0c56954b1b2e5333d5b (patch) | |
tree | 9430219767f9534be57a7021ecfbdd7f7d1d7401 /headers.c | |
parent | 24b5f0ecc610d61c318c2c0afb594e41d4fbaf7d (diff) | |
download | bdwgc-e717f1191ba099d46a4eb0c56954b1b2e5333d5b.tar.gz |
Export GC_apply_to_all_blocks() as public API
Issue #460 (bdwgc).
* headers.c (GC_apply_to_all_blocks): Add GC_API and GC_CALL modifiers;
use GC_walk_hblk_fn; use GC_word instead of word; declare fn using
GC_walk_hblk_fn; move comment to gc_mark.h.
* include/gc/gc_mark.h (struct GC_hblk_s, GC_walk_hblk_fn): Declare.
* include/gc/gc_mark.h (GC_apply_to_all_blocks): Move declaration from
include/private/gc_priv.h.
* include/private/gcconfig.h [GC_PRIVATE_H] (hblk): Define as macro (to
GC_hblk_s).
Diffstat (limited to 'headers.c')
-rw-r--r-- | headers.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -329,11 +329,8 @@ GC_INNER void GC_remove_counts(struct hblk *h, size_t sz/* bytes */) } } -/* Apply fn to all allocated blocks. It is the caller responsibility */ -/* to avoid data race during the function execution (e.g. by holding */ -/* the allocation lock). */ -void GC_apply_to_all_blocks(void (*fn)(struct hblk *h, word client_data), - word client_data) +GC_API void GC_CALL GC_apply_to_all_blocks(GC_walk_hblk_fn fn, + GC_word client_data) { signed_word j; bottom_index * index_p; |