1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-06 04:00:26 +02:00
guile/libguile/trace.h
Andy Wingo 7b4f4427f8 Update for Whippet changes, VM stacks scanned partly-conservatively
* libguile/trace.h (scm_from_ref, scm_to_ref): Helpers moved here;
update all callers.
* libguile/loader.c (scm_trace_loader_roots):
* libguile/threads.c (scm_trace_thread_roots):
* libguile/vm.c (scm_trace_vm_roots): Update for new
pinned-roots prototype.
* libguile/whippet-embedder.h (gc_extern_space_visit): Update for
Whippet API changes.
2025-05-21 14:31:23 +02:00

82 lines
2.9 KiB
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef SCM_THREADS_INTERNAL_H
#define SCM_THREADS_INTERNAL_H
/* Copyright 2025 Free Software Foundation, Inc.
This file is part of Guile.
Guile is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Guile is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with Guile. If not, see
<https://www.gnu.org/licenses/>. */
#include "libguile/scm.h"
#include "gc-ref.h"
struct scm_thread;
struct scm_vm;
struct gc_heap;
struct gc_heap_roots { int unused; };
static inline SCM
scm_from_ref (struct gc_ref ref)
{
return SCM_PACK (gc_ref_value (ref));
}
static inline struct gc_ref
scm_to_ref (SCM scm)
{
return gc_ref (SCM_UNPACK (scm));
}
SCM_INTERNAL void
scm_trace_thread_roots (struct scm_thread *thread,
void (*trace_pinned) (struct gc_ref ref,
struct gc_heap *heap,
void *trace_data),
void (*trace_ambiguous) (uintptr_t lo,
uintptr_t hi,
int possibly_interior,
struct gc_heap *heap,
void *trace_data),
struct gc_heap *heap,
void *trace_data);
SCM_INTERNAL void
scm_trace_vm_roots (struct scm_vm *vp,
void (*trace_pinned) (struct gc_ref ref,
struct gc_heap *heap,
void *trace_data),
void (*trace_ambiguous) (uintptr_t lo,
uintptr_t hi,
int possibly_interior,
struct gc_heap *heap,
void *trace_data),
struct gc_heap *heap,
void *trace_data);
SCM_INTERNAL void
scm_trace_loader_roots (void (*trace_ambiguous) (uintptr_t lo,
uintptr_t hi,
int possibly_interior,
struct gc_heap *heap,
void *trace_data),
struct gc_heap *heap,
void *trace_data);
#endif /* SCM_THREADS_INTERNAL_H */