aboutsummaryrefslogtreecommitdiff
path: root/src/libthread/mkfile
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-12-25 21:57:50 +0000
committerrsc <devnull@localhost>2004-12-25 21:57:50 +0000
commit619085f0b4a85104ef6c7496f9ce1f46e9b17c82 (patch)
tree9959c15a14c44e8c8fe38f78bbcbbb576d23b2aa /src/libthread/mkfile
parent1544f90960275dc9211bde30329c3258e0e1bf38 (diff)
downloadplan9port-619085f0b4a85104ef6c7496f9ce1f46e9b17c82.tar.gz
plan9port-619085f0b4a85104ef6c7496f9ce1f46e9b17c82.tar.bz2
plan9port-619085f0b4a85104ef6c7496f9ce1f46e9b17c82.zip
more new libthread
Diffstat (limited to 'src/libthread/mkfile')
-rw-r--r--src/libthread/mkfile39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/libthread/mkfile b/src/libthread/mkfile
new file mode 100644
index 00000000..98093788
--- /dev/null
+++ b/src/libthread/mkfile
@@ -0,0 +1,39 @@
+<$PLAN9/src/mkhdr
+
+LIB=libthread.a
+OFILES=\
+ channel.$O\
+ exec.$O\
+ ioproc.$O\
+ iorw.$O\
+ pthread.$O\
+ qlock.$O\
+ ref.$O\
+ thread.$O\
+
+<$PLAN9/src/mksyslib
+
+HFILES=thread.h threadimpl.h
+
+tprimes: tprimes.$O
+ 9l -o $target $target.$O $PLAN9/lib/$LIB -l9 -lpthread
+tspawn: tspawn.$O
+ 9l -o $target $target.$O $PLAN9/lib/$LIB -l9 -lpthread
+tspawnloop: tspawnloop.$O
+ 9l -o $target $target.$O $PLAN9/lib/$LIB -l9 -lpthread
+
+%.$O: %.c
+ 9c -I. $stem.c
+
+test:V: tprimes tspawn
+ primes 1 10007 >p1.txt
+ $PLAN9/bin/time ./tprimes 10000 >tp1.txt
+ cmp p1.txt tp1.txt
+ primes 1 1009 >p2.txt
+ $PLAN9/bin/time ./tprimes 1000 >tp2.txt
+ cmp p2.txt tp2.txt
+ echo tspawn should take 3 seconds, not 6
+ $PLAN9/bin/time ./tspawn sleep 3 >/dev/null
+
+CLEANFILES=p1.txt p2.txt tp1.txt tp2.txt
+