blob: 980937888859d4873f0c23dbc5e969494df14c50 [file] [log] [blame]
rsc619085f2004-12-25 21:57:50 +00001<$PLAN9/src/mkhdr
2
3LIB=libthread.a
4OFILES=\
5 channel.$O\
6 exec.$O\
7 ioproc.$O\
8 iorw.$O\
9 pthread.$O\
10 qlock.$O\
11 ref.$O\
12 thread.$O\
13
14<$PLAN9/src/mksyslib
15
16HFILES=thread.h threadimpl.h
17
18tprimes: tprimes.$O
19 9l -o $target $target.$O $PLAN9/lib/$LIB -l9 -lpthread
20tspawn: tspawn.$O
21 9l -o $target $target.$O $PLAN9/lib/$LIB -l9 -lpthread
22tspawnloop: tspawnloop.$O
23 9l -o $target $target.$O $PLAN9/lib/$LIB -l9 -lpthread
24
25%.$O: %.c
26 9c -I. $stem.c
27
28test:V: tprimes tspawn
29 primes 1 10007 >p1.txt
30 $PLAN9/bin/time ./tprimes 10000 >tp1.txt
31 cmp p1.txt tp1.txt
32 primes 1 1009 >p2.txt
33 $PLAN9/bin/time ./tprimes 1000 >tp2.txt
34 cmp p2.txt tp2.txt
35 echo tspawn should take 3 seconds, not 6
36 $PLAN9/bin/time ./tspawn sleep 3 >/dev/null
37
38CLEANFILES=p1.txt p2.txt tp1.txt tp2.txt
39