mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-17 21:42:25 +02:00
Refactor handling of precise and conservative roots
This commit is contained in:
parent
2a619ba67d
commit
283721b39a
5 changed files with 31 additions and 37 deletions
18
bdw.h
18
bdw.h
|
@ -1,3 +1,5 @@
|
|||
#include "conservative-roots.h"
|
||||
|
||||
// When pthreads are used, let `libgc' know about it and redirect
|
||||
// allocation calls such as `GC_MALLOC ()' to (contention-free, faster)
|
||||
// thread-local allocation.
|
||||
|
@ -32,22 +34,6 @@ static inline void* allocate(struct context *cx, enum alloc_kind kind,
|
|||
abort();
|
||||
}
|
||||
|
||||
struct handle {
|
||||
void *v;
|
||||
};
|
||||
|
||||
#define HANDLE_TO(T) union { T* v; struct handle handle; }
|
||||
#define HANDLE_REF(h) h.v
|
||||
#define HANDLE_SET(h,val) do { h.v = val; } while (0)
|
||||
#define PUSH_HANDLE(cx, h) push_handle(cx, &h.handle)
|
||||
#define POP_HANDLE(cx, h) pop_handle(cx, &h.handle)
|
||||
|
||||
static inline void push_handle(struct context *cx, struct handle *handle) {
|
||||
}
|
||||
|
||||
static inline void pop_handle(struct context *cx, struct handle *handle) {
|
||||
}
|
||||
|
||||
static inline void init_field(void **addr, void *val) {
|
||||
*addr = val;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue