mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-13 09:10:26 +02:00
Stub out support for multiple mutator threads on semi, mark-sweep
For semi probably we never implement support for multiple mutator threads. We will do local freelists for mark-sweep though.
This commit is contained in:
parent
a654a790b9
commit
883a761775
3 changed files with 26 additions and 5 deletions
13
Makefile
13
Makefile
|
@ -2,23 +2,26 @@ TESTS=gcbench quads mt-gcbench # MT_GCBench MT_GCBench2
|
|||
COLLECTORS=bdw semi mark-sweep parallel-mark-sweep
|
||||
|
||||
CC=gcc
|
||||
CFLAGS=-Wall -O2 -g -fno-strict-aliasing
|
||||
CFLAGS=-Wall -O2 -g -fno-strict-aliasing -Wno-unused -DNDEBUG
|
||||
INCLUDES=-I.
|
||||
LDFLAGS=-lpthread
|
||||
COMPILE=$(CC) $(CFLAGS) $(INCLUDES) $(LDFLAGS)
|
||||
|
||||
ALL_TESTS=$(foreach COLLECTOR,$(COLLECTORS),$(addprefix $(COLLECTOR)-,$(TESTS)))
|
||||
|
||||
all: $(ALL_TESTS)
|
||||
|
||||
bdw-%: bdw.h conservative-roots.h %-types.h %.c
|
||||
$(CC) $(CFLAGS) -DNDEBUG -lpthread `pkg-config --libs --cflags bdw-gc` -I. -DGC_BDW -o $@ $*.c
|
||||
$(COMPILE) `pkg-config --libs --cflags bdw-gc` -DGC_BDW -o $@ $*.c
|
||||
|
||||
semi-%: semi.h precise-roots.h %-types.h heap-objects.h %.c
|
||||
$(CC) $(CFLAGS) -I. -DNDEBUG -DGC_SEMI -o $@ $*.c
|
||||
$(COMPILE) -DGC_SEMI -o $@ $*.c
|
||||
|
||||
mark-sweep-%: mark-sweep.h precise-roots.h serial-marker.h assert.h debug.h %-types.h heap-objects.h %.c
|
||||
$(CC) $(CFLAGS) -I. -Wno-unused -DNDEBUG -DGC_MARK_SWEEP -o $@ $*.c
|
||||
$(COMPILE) -DGC_MARK_SWEEP -o $@ $*.c
|
||||
|
||||
parallel-mark-sweep-%: mark-sweep.h precise-roots.h parallel-marker.h assert.h debug.h %-types.h heap-objects.h %.c
|
||||
$(CC) $(CFLAGS) -I. -Wno-unused -DNDEBUG -DGC_PARALLEL_MARK_SWEEP -lpthread -o $@ $*.c
|
||||
$(COMPILE) -DGC_PARALLEL_MARK_SWEEP -o $@ $*.c
|
||||
|
||||
check: $(addprefix test-$(TARGET),$(TARGETS))
|
||||
|
||||
|
|
|
@ -476,6 +476,15 @@ static struct context* initialize_gc(size_t size) {
|
|||
return cx;
|
||||
}
|
||||
|
||||
static struct context* initialize_gc_for_thread(uintptr_t *stack_base,
|
||||
struct context *parent) {
|
||||
fprintf(stderr,
|
||||
"Multiple mutator threads not yet implemented.\n");
|
||||
exit(1);
|
||||
}
|
||||
static void finish_gc_for_thread(struct context *cx) {
|
||||
}
|
||||
|
||||
static inline void print_start_gc_stats(struct context *cx) {
|
||||
}
|
||||
|
||||
|
|
9
semi.h
9
semi.h
|
@ -173,6 +173,15 @@ static struct context* initialize_gc(size_t size) {
|
|||
return cx;
|
||||
}
|
||||
|
||||
static struct context* initialize_gc_for_thread(uintptr_t *stack_base,
|
||||
struct context *parent) {
|
||||
fprintf(stderr,
|
||||
"Semispace copying collector not appropriate for multithreaded use.\n");
|
||||
exit(1);
|
||||
}
|
||||
static void finish_gc_for_thread(struct context *cx) {
|
||||
}
|
||||
|
||||
static inline void print_start_gc_stats(struct context *cx) {
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue