trapslab initialized

This commit is contained in:
2025-06-12 10:45:04 +08:00
parent 2a8fad821b
commit 028cf61d61
40 changed files with 366 additions and 3188 deletions

View File

@@ -1,3 +1,4 @@
# To compile and run with a lab solution, set the lab name in conf/lab.mk
# (e.g., LAB=util). Run make grade to test solution with the lab's
# grade script (e.g., grade-lab-util).
@@ -84,7 +85,7 @@ LD = $(TOOLPREFIX)ld
OBJCOPY = $(TOOLPREFIX)objcopy
OBJDUMP = $(TOOLPREFIX)objdump
CFLAGS = -Wall -Werror -O1 -fno-omit-frame-pointer -ggdb -gdwarf-2
CFLAGS = -Wall -Werror -O -fno-omit-frame-pointer -ggdb -gdwarf-2
ifdef LAB
LABUPPER = $(shell echo $(LAB) | tr a-z A-Z)
@@ -237,16 +238,15 @@ $U/_uthread: $U/uthread.o $U/uthread_switch.o $(ULIB)
$(OBJDUMP) -S $U/_uthread > $U/uthread.asm
ph: notxv6/ph.c
gcc -o ph -g -Ofast $(XCFLAGS) notxv6/ph.c -pthread
gcc -o ph -g -O2 $(XCFLAGS) notxv6/ph.c -pthread
barrier: notxv6/barrier.c
gcc -o barrier -g -Ofast $(XCFLAGS) notxv6/barrier.c -pthread
gcc -o barrier -g -O2 $(XCFLAGS) notxv6/barrier.c -pthread
endif
ifeq ($(LAB),pgtbl)
UPROGS += \
$U/_pgtbltest\
$U/_dirtypagestest
$U/_pgtbltest
endif
ifeq ($(LAB),lock)
@@ -343,7 +343,7 @@ grade:
@echo $(MAKE) clean
@$(MAKE) clean || \
(echo "'make clean' failed. HINT: Do you have another running instance of xv6?" && exit 1)
python3.12 ./grade-lab-$(LAB) $(GRADEFLAGS)
./grade-lab-$(LAB) $(GRADEFLAGS)
##
## FOR submissions