diff options
author | Andy Wingo <wingo@pobox.com> | 2025-04-11 14:10:41 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2025-04-11 14:10:41 +0200 |
commit | db181e67ff482ab08cbdb0c1a88997b3a886f900 (patch) | |
tree | 6d16fbca515ae3cf506a9d16dbc89c472446e5d9 /libguile/whippet/src/gc-stack.h | |
parent | af96820e072d18c49ac03e80c6f3466d568dc77d (diff) | |
parent | f909438596f63ecd44c5b9a28385260714857361 (diff) | |
download | guile-db181e67ff482ab08cbdb0c1a88997b3a886f900.tar.gz |
Merged Whippet into libguile/whippet
Diffstat (limited to 'libguile/whippet/src/gc-stack.h')
-rw-r--r-- | libguile/whippet/src/gc-stack.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/libguile/whippet/src/gc-stack.h b/libguile/whippet/src/gc-stack.h new file mode 100644 index 000000000..15df9df6d --- /dev/null +++ b/libguile/whippet/src/gc-stack.h @@ -0,0 +1,33 @@ +#ifndef GC_STACK_H +#define GC_STACK_H + +#ifndef GC_IMPL +#error internal header file, not part of API +#endif + +#include "gc-inline.h" +#include <setjmp.h> + +struct gc_stack_addr { + uintptr_t addr; +}; + +struct gc_stack { + struct gc_stack_addr cold; + struct gc_stack_addr hot; + jmp_buf registers; +}; + +struct gc_heap; + +GC_INTERNAL void gc_stack_init(struct gc_stack *stack, + struct gc_stack_addr *base); +GC_INTERNAL void gc_stack_capture_hot(struct gc_stack *stack); +GC_INTERNAL void gc_stack_visit(struct gc_stack *stack, + void (*visit)(uintptr_t low, uintptr_t high, + struct gc_heap *heap, + void *data), + struct gc_heap *heap, + void *data); + +#endif // GC_STACK_H |