0
我已經完成了我的ASST0(hello world!)。但是,當我嘗試做ASST1(同步)B請結果看起來像 -OS161 ASST1爲什麼`bmake`結果'錯誤代碼1`?
[email protected]:~/cs350-os161/os161-1.99/kern/compile/ASST1$ bmake
cs350-gcc -g -Wall -W -Wwrite-strings -Wmissing-prototypes -Werror -std=gnu99 -mno-abicalls -fno-pic -ffixed-23 -nostdinc -I../../include -I../../dev -I. -Iincludelinks -ffreestanding -D_KERNEL -DUW -c ../../startup/math.c
cc1: warnings being treated as errors
../../startup/math.c:65: warning: no previous prototype for ‘adder’
../../startup/math.c: In function ‘maths’:
../../startup/math.c:157: warning: passing argument 3 of ‘thread_fork’ makes pointer from integer without a cast
../../startup/math.c:157: warning: passing argument 5 of ‘thread_fork’ makes integer from pointer without a cast
*** Error code 1
Stop.
bmake: stopped in /home/newubuntu/cs350-os161/os161-1.99/kern/compile/ASST1
[email protected]:~/cs350-os161/os161-1.99/kern/compile/ASST1$
一提的是我沒有在math.c
改變任何(不處理同步,只是測試)。但我的朋友編輯了他的機器中的同步代碼,並且可以工作(針對10個線程)。有趣的是,當他更改線程數量(NADDERS)10 t0 20時,bmake導致錯誤。