Browse Source

Plan 9 from Bell Labs 2003-03-10

David du Colombier 17 years ago
parent
commit
c7c0933c28

+ 33 - 29
dist/replica/plan9.db

@@ -4948,7 +4948,7 @@ sys/src/9/alphapc/sd53c8xx.c - 664 sys sys 1015012787 51009
 sys/src/9/alphapc/sdata.c - 664 sys sys 1015012787 25
 sys/src/9/alphapc/sdscsi.c - 664 sys sys 1015012787 26
 sys/src/9/alphapc/sio.c - 664 sys sys 1015012787 293
-sys/src/9/alphapc/trap.c - 664 sys sys 1032052969 18176
+sys/src/9/alphapc/trap.c - 664 sys sys 1047261658 17822
 sys/src/9/alphapc/uarti8250.c - 664 sys sys 1015012788 29
 sys/src/9/alphapc/vga.c - 664 sys sys 1015012788 23
 sys/src/9/alphapc/vgargb524.c - 664 sys sys 1015012788 29
@@ -5019,6 +5019,7 @@ sys/src/9/boot/bootmkfile - 664 sys sys 1032053196 390
 sys/src/9/boot/doauthenticate.c - 664 sys sys 1015012529 2300
 sys/src/9/boot/embed.c - 664 sys sys 1039763720 1191
 sys/src/9/boot/getpasswd.c - 664 sys sys 957373373 654
+sys/src/9/boot/libboot.a8 - 664 sys sys 1047260766 54718
 sys/src/9/boot/local.c - 664 sys sys 1039763718 2041
 sys/src/9/boot/mkboot - 775 sys sys 1045504382 1935
 sys/src/9/boot/nopsession.c - 664 sys sys 957373374 843
@@ -5027,25 +5028,25 @@ sys/src/9/boot/sac.c - 664 sys sys 1015012530 802
 sys/src/9/boot/settime.c - 664 sys sys 1036813626 2473
 sys/src/9/boot/testboot.c - 664 sys sys 1039763734 496
 sys/src/9/ip - 20000000775 sys sys 1015278450 0
-sys/src/9/ip/arp.c - 664 sys sys 1026847564 10547
+sys/src/9/ip/arp.c - 664 sys sys 1047260560 10677
 sys/src/9/ip/chandial.c - 664 sys sys 1022588098 2276
-sys/src/9/ip/devip.c - 664 sys sys 1044630546 24033
+sys/src/9/ip/devip.c - 664 sys sys 1047260561 24089
 sys/src/9/ip/eipconvtest.c - 664 sys sys 1022588098 3135
-sys/src/9/ip/esp.c - 664 sys sys 1026847565 17081
-sys/src/9/ip/ethermedium.c - 664 sys sys 1045063514 15116
-sys/src/9/ip/gre.c - 664 sys sys 1045773454 4679
-sys/src/9/ip/icmp.c - 664 sys sys 1045773453 9417
-sys/src/9/ip/icmp6.c - 664 sys sys 1045773452 18063
-sys/src/9/ip/igmp.c - 664 sys sys 1026847566 5185
-sys/src/9/ip/il.c - 664 sys sys 1045773452 26941
+sys/src/9/ip/esp.c - 664 sys sys 1047260561 17084
+sys/src/9/ip/ethermedium.c - 664 sys sys 1047260562 15120
+sys/src/9/ip/gre.c - 664 sys sys 1047260562 4684
+sys/src/9/ip/icmp.c - 664 sys sys 1047260563 9437
+sys/src/9/ip/icmp6.c - 664 sys sys 1047260563 18098
+sys/src/9/ip/igmp.c - 664 sys sys 1047260564 5190
+sys/src/9/ip/il.c - 664 sys sys 1047260564 26943
 sys/src/9/ip/inferno.c - 664 sys sys 1022588098 517
-sys/src/9/ip/ip.c - 664 sys sys 1045773455 15209
-sys/src/9/ip/ip.h - 664 sys sys 1045774750 15844
+sys/src/9/ip/ip.c - 664 sys sys 1047260565 15243
+sys/src/9/ip/ip.h - 664 sys sys 1047260722 16078
 sys/src/9/ip/ipaux.c - 664 sys sys 1022588098 12656
-sys/src/9/ip/ipifc.c - 664 sys sys 1045063513 37702
-sys/src/9/ip/ipmux.c - 664 sys sys 1044630555 15352
-sys/src/9/ip/iproute.c - 664 sys sys 1022588099 14260
-sys/src/9/ip/ipv6.c - 664 sys sys 1045773454 14399
+sys/src/9/ip/ipifc.c - 664 sys sys 1047260565 37717
+sys/src/9/ip/ipmux.c - 664 sys sys 1047260566 15362
+sys/src/9/ip/iproute.c - 664 sys sys 1047260566 14689
+sys/src/9/ip/ipv6.c - 664 sys sys 1047260567 14431
 sys/src/9/ip/ipv6.h - 664 sys sys 1022588099 4304
 sys/src/9/ip/loopbackmedium.c - 664 sys sys 1045063513 1651
 sys/src/9/ip/netdevmedium.c - 664 sys sys 1045063517 2675
@@ -5053,10 +5054,10 @@ sys/src/9/ip/netlog.c - 664 sys sys 1026847568 4003
 sys/src/9/ip/nullmedium.c - 664 sys sys 1022588099 491
 sys/src/9/ip/pktmedium.c - 664 sys sys 1045063516 1355
 sys/src/9/ip/ptclbsum.c - 664 sys sys 1022588099 1243
-sys/src/9/ip/rudp.c - 664 sys sys 1026847569 21413
-sys/src/9/ip/tcp.c - 664 sys sys 1045773456 65222
+sys/src/9/ip/rudp.c - 664 sys sys 1047260568 21418
+sys/src/9/ip/tcp.c - 664 sys sys 1047260569 65260
 sys/src/9/ip/tripmedium.c - 664 sys sys 1045063515 7136
-sys/src/9/ip/udp.c - 664 sys sys 1045773451 13022
+sys/src/9/ip/udp.c - 664 sys sys 1047260569 13089
 sys/src/9/mkfile - 664 sys sys 1017795039 191
 sys/src/9/mtx - 20000000775 sys sys 1018721288 0
 sys/src/9/mtx/clock.c - 664 sys sys 1032053278 1293
@@ -5084,7 +5085,7 @@ sys/src/9/mtx/mtxcpu - 664 sys sys 1039753442 421
 sys/src/9/mtx/pci.c - 664 sys sys 1018721287 16662
 sys/src/9/mtx/random.c - 664 sys sys 1036813598 1983
 sys/src/9/mtx/raven.c - 664 sys sys 1018721288 2587
-sys/src/9/mtx/trap.c - 664 sys sys 1032053282 16023
+sys/src/9/mtx/trap.c - 664 sys sys 1047261660 15683
 sys/src/9/mtx/uarti8250.c - 664 sys sys 1018721288 11590
 sys/src/9/pc - 20000000775 sys sys 1018721225 0
 sys/src/9/pc/apbootstrap.h - 664 sys sys 1018553448 928
@@ -5175,7 +5176,7 @@ sys/src/9/pc/sd53c8xx.n - 664 sys sys 1032059019 12455
 sys/src/9/pc/sdata.c - 664 sys sys 1044630537 45002
 sys/src/9/pc/sdmylex.c - 664 sys sys 1015014523 27750
 sys/src/9/pc/sdscsi.c - 664 sys sys 1015014523 7412
-sys/src/9/pc/trap.c - 664 sys sys 1044630544 19368
+sys/src/9/pc/trap.c - 664 sys sys 1047261661 18991
 sys/src/9/pc/uarti8250.c - 664 sys sys 1020369766 12671
 sys/src/9/pc/uartpci.c - 664 sys sys 1015014524 2709
 sys/src/9/pc/usb.h - 664 sys sys 1015014524 3505
@@ -5232,7 +5233,7 @@ sys/src/9/port/devmouse.c - 664 sys sys 1036827459 11420
 sys/src/9/port/devnmouse.c - 664 sys sys 1036812999 3738
 sys/src/9/port/devpipe.c - 664 sys sys 1032640439 5825
 sys/src/9/port/devpnp.c - 664 sys sys 1019864265 13027
-sys/src/9/port/devproc.c - 664 sys sys 1036813000 23484
+sys/src/9/port/devproc.c - 664 sys sys 1047260622 23418
 sys/src/9/port/devrealtime.c - 664 sys sys 1044630510 15975
 sys/src/9/port/devroot.c - 664 sys sys 1042304978 3593
 sys/src/9/port/devsd.c - 664 sys sys 1026847547 28679
@@ -5241,7 +5242,7 @@ sys/src/9/port/devsegment.c - 664 sys sys 1017679394 9600
 sys/src/9/port/devsrv.c - 664 sys sys 1014931174 5146
 sys/src/9/port/devssl.c - 664 sys sys 1045063590 26100
 sys/src/9/port/devtinyfs.c - 664 sys sys 1015278339 15347
-sys/src/9/port/devtls.c - 664 sys sys 1018721201 43664
+sys/src/9/port/devtls.c - 664 sys sys 1047242478 43722
 sys/src/9/port/devuart.c - 664 sys sys 1044630513 11590
 sys/src/9/port/edf.c - 664 sys sys 1044630516 24351
 sys/src/9/port/edf.h - 664 sys sys 1037669301 4398
@@ -5267,13 +5268,13 @@ sys/src/9/port/nulledf.c - 664 sys sys 1037669300 821
 sys/src/9/port/page.c - 664 sys sys 1014931177 8086
 sys/src/9/port/parse.c - 664 sys sys 1014931177 2026
 sys/src/9/port/pgrp.c - 664 sys sys 1032052809 3925
-sys/src/9/port/portclock.c - 664 sys sys 1044630519 3919
-sys/src/9/port/portdat.h - 664 sys sys 1045491608 21205
-sys/src/9/port/portfns.h - 664 sys sys 1045773495 10521
+sys/src/9/port/portclock.c - 664 sys sys 1047260623 3835
+sys/src/9/port/portdat.h - 664 sys sys 1047260623 21132
+sys/src/9/port/portfns.h - 664 sys sys 1047260622 10601
 sys/src/9/port/portmkfile - 664 sys sys 1039753335 2372
 sys/src/9/port/print.c - 664 sys sys 1014931178 227
-sys/src/9/port/proc.c - 664 sys sys 1036813004 22129
-sys/src/9/port/qio.c - 664 sys sys 1045773483 23156
+sys/src/9/port/proc.c - 664 sys sys 1047260621 23241
+sys/src/9/port/qio.c - 664 sys sys 1047260594 23281
 sys/src/9/port/qlock.c - 664 sys sys 1026847551 3246
 sys/src/9/port/rdb.c - 664 sys sys 1018721202 1698
 sys/src/9/port/realtimesub.c - 664 sys sys 1037669301 9078
@@ -9513,7 +9514,7 @@ sys/src/cmd/postscript/mpictures/mkfile - 664 sys sys 953344683 265
 sys/src/cmd/postscript/mpictures/pictures.sr - 664 sys sys 944961059 4320
 sys/src/cmd/postscript/p9bitpost - 20000000775 sys sys 956345942 0
 sys/src/cmd/postscript/p9bitpost/mkfile - 664 sys sys 953344684 191
-sys/src/cmd/postscript/p9bitpost/p9bitpost.c - 664 sys sys 1015090086 2021
+sys/src/cmd/postscript/p9bitpost/p9bitpost.c - 664 sys sys 1047227329 2021
 sys/src/cmd/postscript/p9bitpost/pslib.c - 664 sys sys 1039753066 23150
 sys/src/cmd/postscript/p9bitpost/pslib.h - 664 sys sys 984789204 180
 sys/src/cmd/postscript/picpack - 20000000775 sys sys 944961065 0
@@ -10296,6 +10297,9 @@ sys/src/cmd/unix/u9fs/u9fs.c - 664 sys sys 1043769157 30784
 sys/src/cmd/unix/u9fs/u9fs.h - 664 sys sys 1043768488 649
 sys/src/cmd/unix/u9fs/u9fsauth.h - 664 sys sys 1015092354 126
 sys/src/cmd/unix/u9fs/utfrune.c - 664 sys sys 1015092354 387
+sys/src/cmd/unix/winplumb.c - 664 sys sys 1047233509 5015
+sys/src/cmd/unix/winplumb.exe - 664 sys sys 1047233509 32768
+sys/src/cmd/unix/winstart - 775 sys sys 1047233540 60
 sys/src/cmd/unmount.c - 664 sys sys 1014926615 442
 sys/src/cmd/upas - 20000000775 sys sys 1018549518 0
 sys/src/cmd/upas/README - 664 sys sys 944961329 1041

+ 361 - 0
dist/replica/plan9.log

@@ -18202,3 +18202,364 @@
 1047058280 4 c 386/bin/fossil/fossil - 775 sys sys 1047057884 333652
 1047058280 5 c 386/bin/upas/smtpd - 775 sys sys 1047057913 307893
 1047058280 6 c 386/lib/ape/libap.a - 664 sys sys 1047057916 780276
+1047227458 0 c sys/src/cmd/postscript/p9bitpost/p9bitpost.c - 664 sys sys 1047227329 2021
+1047233946 0 a sys/src/cmd/unix/winplumb.c - 664 sys sys 1047233509 5015
+1047233946 1 a sys/src/cmd/unix/winplumb.exe - 664 sys sys 1047233509 32768
+1047233946 2 a sys/src/cmd/unix/winstart - 775 sys sys 1047233540 60
+1047243659 0 c sys/src/9/port/devtls.c - 664 sys sys 1047242478 43722
+1047261668 0 c sys/src/9/alphapc/trap.c - 664 sys sys 1047261658 17822
+1047261668 1 a sys/src/9/boot/libboot.a8 - 664 sys sys 1047260766 54718
+1047261668 2 c sys/src/9/ip/arp.c - 664 sys sys 1047260560 10677
+1047261668 3 c sys/src/9/ip/devip.c - 664 sys sys 1047260561 24089
+1047261668 4 c sys/src/9/ip/esp.c - 664 sys sys 1047260561 17084
+1047261668 5 c sys/src/9/ip/ethermedium.c - 664 sys sys 1047260562 15120
+1047261668 6 c sys/src/9/ip/gre.c - 664 sys sys 1047260562 4684
+1047261668 7 c sys/src/9/ip/icmp.c - 664 sys sys 1047260563 9437
+1047261668 8 c sys/src/9/ip/icmp6.c - 664 sys sys 1047260563 18098
+1047261668 9 c sys/src/9/ip/igmp.c - 664 sys sys 1047260564 5190
+1047261668 10 c sys/src/9/ip/il.c - 664 sys sys 1047260564 26943
+1047261668 11 c sys/src/9/ip/ip.c - 664 sys sys 1047260565 15243
+1047261668 12 c sys/src/9/ip/ip.h - 664 sys sys 1047260722 16078
+1047261668 13 c sys/src/9/ip/ipifc.c - 664 sys sys 1047260565 37717
+1047261668 14 c sys/src/9/ip/ipmux.c - 664 sys sys 1047260566 15362
+1047261668 15 c sys/src/9/ip/iproute.c - 664 sys sys 1047260566 14689
+1047261668 16 c sys/src/9/ip/ipv6.c - 664 sys sys 1047260567 14431
+1047261668 17 c sys/src/9/ip/rudp.c - 664 sys sys 1047260568 21418
+1047261668 18 c sys/src/9/ip/tcp.c - 664 sys sys 1047260569 65260
+1047261668 19 c sys/src/9/ip/udp.c - 664 sys sys 1047260569 13089
+1047261668 20 c sys/src/9/mtx/trap.c - 664 sys sys 1047261660 15683
+1047261668 21 a sys/src/9/pc/l.8 - 664 sys sys 1047261686 11199
+1047261668 22 c sys/src/9/pc/trap.c - 664 sys sys 1047261661 18991
+1047261668 23 a sys/src/9/pc/arp.8 - 664 sys sys 1047261691 19709
+1047261668 24 a sys/src/9/pc/cga.8 - 664 sys sys 1047261687 3799
+1047261668 25 a sys/src/9/pc/devmouse.8 - 664 sys sys 1047261691 21432
+1047261668 26 a sys/src/9/pc/devpnp.8 - 664 sys sys 1047261691 31660
+1047261668 27 a sys/src/9/pc/devtls.8 - 664 sys sys 1047261690 86538
+1047261668 28 a sys/src/9/pc/dma.8 - 664 sys sys 1047261690 6380
+1047261668 29 a sys/src/9/pc/edf.8 - 664 sys sys 1047261691 62364
+1047261668 30 a sys/src/9/pc/ether2000.8 - 664 sys sys 1047261689 5615
+1047261668 31 a sys/src/9/pc/ether79c970.8 - 664 sys sys 1047261690 18538
+1047261668 32 a sys/src/9/pc/ether82557.8 - 664 sys sys 1047261689 37313
+1047261668 33 a sys/src/9/pc/ether83815.8 - 664 sys sys 1047261696 29701
+1047261668 34 a sys/src/9/pc/etherec2t.8 - 664 sys sys 1047261689 8217
+1047261668 35 a sys/src/9/pc/etherelnk3.8 - 664 sys sys 1047261690 53972
+1047261668 36 a sys/src/9/pc/etherwavelan.8 - 664 sys sys 1047261689 8197
+1047261668 37 a sys/src/9/pc/i8253.8 - 664 sys sys 1047261687 10221
+1047261668 38 a sys/src/9/pc/i8259.8 - 664 sys sys 1047261687 5980
+1047261668 39 a sys/src/9/pc/init.h - 664 sys sys 1047261687 1836
+1047261668 40 a sys/src/9/pc/init.out - 775 sys sys 1047261687 1087
+1047261668 41 a sys/src/9/pc/init9.8 - 664 sys sys 1047261687 221
+1047261668 42 a sys/src/9/pc/initcode.8 - 664 sys sys 1047261687 1937
+1047261668 43 a sys/src/9/pc/kbd.8 - 664 sys sys 1047261687 13835
+1047261668 44 a sys/src/9/pc/memory.8 - 664 sys sys 1047261687 15245
+1047261668 45 a sys/src/9/pc/mmu.8 - 664 sys sys 1047261688 12552
+1047261668 46 a sys/src/9/pc/pc.c - 664 sys sys 1047261687 5372
+1047261668 47 a sys/src/9/pc/plan9l.8 - 664 sys sys 1047261687 605
+1047261668 48 a sys/src/9/pc/random.8 - 664 sys sys 1047261688 4189
+1047261668 49 a sys/src/9/pc/rdb.8 - 664 sys sys 1047261688 3817
+1047261668 50 a sys/src/9/pc/screen.8 - 664 sys sys 1047261696 14133
+1047261668 51 a sys/src/9/pc/trap.8 - 664 sys sys 1047261689 38216
+1047261668 52 a sys/src/9/pc/uarti8250.8 - 664 sys sys 1047261689 16659
+1047261668 53 a sys/src/9/pc/vgabt485.8 - 664 sys sys 1047261690 7627
+1047261668 54 a sys/src/9/pc/vgaclgd542x.8 - 664 sys sys 1047261696 9889
+1047261668 55 a sys/src/9/pc/vgacyber938x.8 - 664 sys sys 1047261696 7821
+1047261668 56 a sys/src/9/pc/vgamga4xx.8 - 664 sys sys 1047261690 15686
+1047261668 57 a sys/src/9/pc/vgax.8 - 664 sys sys 1047261689 3670
+1047261668 58 a sys/src/9/pc/_386_bin_ip_ipconfig.out - 775 sys sys 1047261706 67366
+1047261668 59 a sys/src/9/pc/_386_bin_ip_ipconfig.root.s - 664 sys sys 1047261710 619171
+1047261668 60 a sys/src/9/pc/apic.8 - 664 sys sys 1047261700 10398
+1047261668 61 a sys/src/9/pc/archmp.8 - 664 sys sys 1047261710 4838
+1047261668 62 a sys/src/9/pc/chandial.8 - 664 sys sys 1047261704 5203
+1047261668 63 a sys/src/9/pc/cis.8 - 664 sys sys 1047261696 16458
+1047261668 64 a sys/src/9/pc/devarch.8 - 664 sys sys 1047261699 34865
+1047261668 65 a sys/src/9/pc/devaudio.8 - 664 sys sys 1047261701 38622
+1047261668 66 a sys/src/9/pc/devcons.8 - 664 sys sys 1047261700 44236
+1047261668 67 a sys/src/9/pc/devdraw.8 - 664 sys sys 1047261712 101310
+1047261668 68 a sys/src/9/pc/devdup.8 - 664 sys sys 1047261703 6905
+1047261668 69 a sys/src/9/pc/devenv.8 - 664 sys sys 1047261698 15779
+1047261668 70 a sys/src/9/pc/devether.8 - 664 sys sys 1047261712 20359
+1047261668 71 a sys/src/9/pc/devfloppy.8 - 664 sys sys 1047261706 38492
+1047261668 72 a sys/src/9/pc/devi82365.8 - 664 sys sys 1047261698 37955
+1047261668 73 a sys/src/9/pc/devkprof.8 - 664 sys sys 1047261710 6573
+1047261668 74 a sys/src/9/pc/devlpt.8 - 664 sys sys 1047261712 11419
+1047261668 75 a sys/src/9/pc/devmnt.8 - 664 sys sys 1047261703 40846
+1047261668 76 a sys/src/9/pc/devpccard.8 - 664 sys sys 1047261707 64257
+1047261668 77 a sys/src/9/pc/devpipe.8 - 664 sys sys 1047261710 14458
+1047261668 78 a sys/src/9/pc/devproc.8 - 664 sys sys 1047261705 53675
+1047261668 79 a sys/src/9/pc/devrtc.8 - 664 sys sys 1047261706 16182
+1047261668 80 a sys/src/9/pc/devsd.8 - 664 sys sys 1047261712 63755
+1047261668 81 a sys/src/9/pc/devsrv.8 - 664 sys sys 1047261704 13018
+1047261668 82 a sys/src/9/pc/devssl.8 - 664 sys sys 1047261702 57610
+1047261668 83 a sys/src/9/pc/devtv.8 - 664 sys sys 1047261700 380414
+1047261668 84 a sys/src/9/pc/devuart.8 - 664 sys sys 1047261708 25993
+1047261668 85 a sys/src/9/pc/devusb.8 - 664 sys sys 1047261709 44502
+1047261668 86 a sys/src/9/pc/ether2114x.8 - 664 sys sys 1047261698 45973
+1047261668 87 a sys/src/9/pc/ether589.8 - 664 sys sys 1047261709 6893
+1047261668 88 a sys/src/9/pc/ether8139.8 - 664 sys sys 1047261698 22169
+1047261668 89 a sys/src/9/pc/ether82543gc.8 - 664 sys sys 1047261704 33245
+1047261668 90 a sys/src/9/pc/etherga620.8 - 664 sys sys 1047261715 411079
+1047261668 91 a sys/src/9/pc/ethermedium.8 - 664 sys sys 1047261705 27746
+1047261668 92 a sys/src/9/pc/ethersink.8 - 664 sys sys 1047261699 3091
+1047261668 93 a sys/src/9/pc/ethersmc.8 - 664 sys sys 1047261705 19450
+1047261668 94 a sys/src/9/pc/factotum.hack - 775 sys sys 1047261710 308052
+1047261668 95 a sys/src/9/pc/icmp.8 - 664 sys sys 1047261713 17789
+1047261668 96 a sys/src/9/pc/icmp6.8 - 664 sys sys 1047261702 30982
+1047261668 97 a sys/src/9/pc/il.8 - 664 sys sys 1047261708 47070
+1047261668 98 a sys/src/9/pc/ipifc.8 - 664 sys sys 1047261704 76839
+1047261668 99 a sys/src/9/pc/iproute.8 - 664 sys sys 1047261712 29156
+1047261668 100 a sys/src/9/pc/ipv6.8 - 664 sys sys 1047261707 20956
+1047261668 101 a sys/src/9/pc/mouse.8 - 664 sys sys 1047261696 8693
+1047261668 102 a sys/src/9/pc/mp.8 - 664 sys sys 1047261709 25858
+1047261668 103 a sys/src/9/pc/netif.8 - 664 sys sys 1047261711 34146
+1047261668 104 a sys/src/9/pc/netlog.8 - 664 sys sys 1047261710 10246
+1047261668 105 a sys/src/9/pc/pci.8 - 664 sys sys 1047261696 38328
+1047261668 106 a sys/src/9/pc/pcmciamodem.8 - 664 sys sys 1047261703 3883
+1047261668 107 a sys/src/9/pc/pktmedium.8 - 664 sys sys 1047261701 2903
+1047261668 108 a sys/src/9/pc/print.8 - 664 sys sys 1047261705 1499
+1047261668 109 a sys/src/9/pc/ptclbsum386.8 - 664 sys sys 1047261700 1303
+1047261668 110 a sys/src/9/pc/sdata.8 - 664 sys sys 1047261703 57670
+1047261668 111 a sys/src/9/pc/sdmylex.8 - 664 sys sys 1047261701 28205
+1047261668 112 a sys/src/9/pc/tcp.8 - 664 sys sys 1047261700 96053
+1047261668 113 a sys/src/9/pc/usbuhci.8 - 664 sys sys 1047261704 59958
+1047261668 114 a sys/src/9/pc/vga.8 - 664 sys sys 1047261697 12238
+1047261668 115 a sys/src/9/pc/vga3dfx.8 - 664 sys sys 1047261700 6560
+1047261668 116 a sys/src/9/pc/vgaark2000pv.8 - 664 sys sys 1047261701 6196
+1047261668 117 a sys/src/9/pc/vgact65545.8 - 664 sys sys 1047261708 5323
+1047261668 118 a sys/src/9/pc/vgaet4000.8 - 664 sys sys 1047261700 7940
+1047261668 119 a sys/src/9/pc/vgamach64xx.8 - 664 sys sys 1047261702 39988
+1047261668 120 a sys/src/9/pc/vgamga2164w.8 - 664 sys sys 1047261711 7137
+1047261668 121 a sys/src/9/pc/vganeomagic.8 - 664 sys sys 1047261702 12371
+1047261668 122 a sys/src/9/pc/vganvidia.8 - 664 sys sys 1047261707 11328
+1047261668 123 a sys/src/9/pc/vgargb524.8 - 664 sys sys 1047261697 6499
+1047261668 124 a sys/src/9/pc/vgas3.8 - 664 sys sys 1047261703 17527
+1047261668 125 a sys/src/9/pc/vgasavage.8 - 664 sys sys 1047261711 6905
+1047261668 126 a sys/src/9/pc/vgatvp3020.8 - 664 sys sys 1047261711 6949
+1047261668 127 a sys/src/9/pc/vgatvp3026.8 - 664 sys sys 1047261706 6109
+1047261668 128 a sys/src/9/pc/wavelan.8 - 664 sys sys 1047261698 58245
+1047261668 129 a sys/src/9/pc/_386_bin_ip_ipconfig.root.8 - 664 sys sys 1047261727 202332
+1047261668 130 a sys/src/9/pc/alarm.8 - 664 sys sys 1047261717 4319
+1047261668 131 a sys/src/9/pc/alloc.8 - 664 sys sys 1047261718 7513
+1047261668 132 a sys/src/9/pc/allocb.8 - 664 sys sys 1047261718 6951
+1047261668 133 a sys/src/9/pc/auth.8 - 664 sys sys 1047261718 5883
+1047261668 134 a sys/src/9/pc/bootpc.8 - 664 sys sys 1047261724 923
+1047261668 135 a sys/src/9/pc/bootpc.c - 664 sys sys 1047261724 339
+1047261668 136 a sys/src/9/pc/bootpc.out - 775 sys sys 1047261726 87154
+1047261668 137 a sys/src/9/pc/bootpc_out.out - 775 sys sys 1047261728 53451
+1047261668 138 a sys/src/9/pc/bootpc_out.root.8 - 664 sys sys 1047261733 49152
+1047261668 139 a sys/src/9/pc/bootpc_out.root.s - 664 sys sys 1047261730 425708
+1047261668 140 a sys/src/9/pc/cache.8 - 664 sys sys 1047261718 17629
+1047261668 141 a sys/src/9/pc/chan.8 - 664 sys sys 1047261719 45841
+1047261668 142 a sys/src/9/pc/dev.8 - 664 sys sys 1047261719 14826
+1047261668 143 a sys/src/9/pc/devcap.8 - 664 sys sys 1047261713 8752
+1047261668 144 a sys/src/9/pc/devip.8 - 664 sys sys 1047261715 60015
+1047261668 145 a sys/src/9/pc/devrealtime.8 - 664 sys sys 1047261717 41859
+1047261668 146 a sys/src/9/pc/devroot.8 - 664 sys sys 1047261716 9176
+1047261668 147 a sys/src/9/pc/devvga.8 - 664 sys sys 1047261717 22919
+1047261668 148 a sys/src/9/pc/ether8003.8 - 664 sys sys 1047261717 9451
+1047261668 149 a sys/src/9/pc/ether8390.8 - 664 sys sys 1047261716 23329
+1047261668 150 a sys/src/9/pc/factotum_hack.out - 775 sys sys 1047261726 214831
+1047261668 151 a sys/src/9/pc/factotum_hack.root.s - 664 sys sys 1047261733 1548264
+1047261668 152 a sys/src/9/pc/fault.8 - 664 sys sys 1047261719 13251
+1047261668 153 a sys/src/9/pc/inferno.8 - 664 sys sys 1047261716 2099
+1047261668 154 a sys/src/9/pc/ip.8 - 664 sys sys 1047261714 22544
+1047261668 155 a sys/src/9/pc/ipaux.8 - 664 sys sys 1047261716 25781
+1047261668 156 a sys/src/9/pc/latin1.8 - 664 sys sys 1047261719 16220
+1047261668 157 a sys/src/9/pc/main.8 - 664 sys sys 1047261723 29628
+1047261668 158 a sys/src/9/pc/netdevmedium.8 - 664 sys sys 1047261718 5401
+1047261668 159 a sys/src/9/pc/nulledf.8 - 664 sys sys 1047261719 2263
+1047261668 160 a sys/src/9/pc/nullmedium.8 - 664 sys sys 1047261717 2038
+1047261668 161 a sys/src/9/pc/page.8 - 664 sys sys 1047261720 14514
+1047261668 162 a sys/src/9/pc/parse.8 - 664 sys sys 1047261720 5224
+1047261668 163 a sys/src/9/pc/pgrp.8 - 664 sys sys 1047261720 9146
+1047261668 164 a sys/src/9/pc/portclock.8 - 664 sys sys 1047261721 8669
+1047261668 165 a sys/src/9/pc/proc.8 - 664 sys sys 1047261721 61974
+1047261668 166 a sys/src/9/pc/qio.8 - 664 sys sys 1047261721 32826
+1047261668 167 a sys/src/9/pc/qlock.8 - 664 sys sys 1047261720 6575
+1047261668 168 a sys/src/9/pc/realtimesub.8 - 664 sys sys 1047261715 31128
+1047261668 169 a sys/src/9/pc/rebootcmd.8 - 664 sys sys 1047261721 5357
+1047261668 170 a sys/src/9/pc/sd53c8xx.8 - 664 sys sys 1047261718 59911
+1047261668 171 a sys/src/9/pc/sdscsi.8 - 664 sys sys 1047261716 10810
+1047261668 172 a sys/src/9/pc/segment.8 - 664 sys sys 1047261721 24350
+1047261668 173 a sys/src/9/pc/swap.8 - 664 sys sys 1047261721 12876
+1047261668 174 a sys/src/9/pc/sysfile.8 - 664 sys sys 1047261722 39619
+1047261668 175 a sys/src/9/pc/sysproc.8 - 664 sys sys 1047261722 28398
+1047261668 176 a sys/src/9/pc/taslock.8 - 664 sys sys 1047261722 7836
+1047261668 177 a sys/src/9/pc/tod.8 - 664 sys sys 1047261722 8047
+1047261668 178 a sys/src/9/pc/uartpci.8 - 664 sys sys 1047261714 4859
+1047261668 179 a sys/src/9/pc/udp.8 - 664 sys sys 1047261714 24643
+1047261668 180 a sys/src/9/pc/vgaclgd546x.8 - 664 sys sys 1047261716 8222
+1047261668 181 a sys/src/9/pc/vgahiqvideo.8 - 664 sys sys 1047261714 9278
+1047261668 182 a sys/src/9/pc/vgai81x.8 - 664 sys sys 1047261713 8129
+1047261668 183 a sys/src/9/pc/vgat2r4.8 - 664 sys sys 1047261714 12866
+1047261668 184 a sys/src/9/pc/vgavmware.8 - 664 sys sys 1047261717 10570
+1047261668 185 a sys/src/9/pc/xalloc.8 - 664 sys sys 1047261722 7099
+1047261668 186 c sys/src/9/port/devproc.c - 664 sys sys 1047260622 23418
+1047261668 187 c sys/src/9/port/portclock.c - 664 sys sys 1047260623 3835
+1047261668 188 c sys/src/9/port/portdat.h - 664 sys sys 1047260623 21132
+1047261668 189 c sys/src/9/port/portfns.h - 664 sys sys 1047260622 10601
+1047261668 190 c sys/src/9/port/proc.c - 664 sys sys 1047260621 23241
+1047261668 191 c sys/src/9/port/qio.c - 664 sys sys 1047260594 23281
+1047263468 0 d sys/src/9/pc/_386_bin_ip_ipconfig.out - 775 sys sys 1047261706 0
+1047263468 1 d sys/src/9/pc/_386_bin_ip_ipconfig.root.8 - 664 sys sys 1047261727 0
+1047263468 2 d sys/src/9/pc/_386_bin_ip_ipconfig.root.s - 664 sys sys 1047261710 0
+1047263468 3 d sys/src/9/pc/alarm.8 - 664 sys sys 1047261717 0
+1047263468 4 d sys/src/9/pc/alloc.8 - 664 sys sys 1047261718 0
+1047263468 5 d sys/src/9/pc/allocb.8 - 664 sys sys 1047261718 0
+1047263468 6 d sys/src/9/pc/apic.8 - 664 sys sys 1047261700 0
+1047263468 7 d sys/src/9/pc/archmp.8 - 664 sys sys 1047261710 0
+1047263468 8 d sys/src/9/pc/arp.8 - 664 sys sys 1047261691 0
+1047263468 9 d sys/src/9/pc/auth.8 - 664 sys sys 1047261718 0
+1047263468 10 d sys/src/9/pc/bootpc.8 - 664 sys sys 1047261724 0
+1047263468 11 d sys/src/9/pc/bootpc.c - 664 sys sys 1047261724 0
+1047263468 12 d sys/src/9/pc/bootpc.out - 775 sys sys 1047261726 0
+1047263468 13 d sys/src/9/pc/bootpc_out.out - 775 sys sys 1047261728 0
+1047263468 14 d sys/src/9/pc/bootpc_out.root.s - 664 sys sys 1047261730 0
+1047263468 15 d sys/src/9/pc/cache.8 - 664 sys sys 1047261718 0
+1047263468 16 d sys/src/9/pc/cga.8 - 664 sys sys 1047261687 0
+1047263468 17 d sys/src/9/pc/chan.8 - 664 sys sys 1047261719 0
+1047263468 18 d sys/src/9/pc/chandial.8 - 664 sys sys 1047261704 0
+1047263468 19 d sys/src/9/pc/cis.8 - 664 sys sys 1047261696 0
+1047263468 20 d sys/src/9/pc/dev.8 - 664 sys sys 1047261719 0
+1047263468 21 d sys/src/9/pc/devarch.8 - 664 sys sys 1047261699 0
+1047263468 22 d sys/src/9/pc/devaudio.8 - 664 sys sys 1047261701 0
+1047263468 23 d sys/src/9/pc/devcap.8 - 664 sys sys 1047261713 0
+1047263468 24 d sys/src/9/pc/devcons.8 - 664 sys sys 1047261700 0
+1047263468 25 d sys/src/9/pc/devdraw.8 - 664 sys sys 1047261712 0
+1047263468 26 d sys/src/9/pc/devenv.8 - 664 sys sys 1047261698 0
+1047263468 27 d sys/src/9/pc/devether.8 - 664 sys sys 1047261712 0
+1047263468 28 d sys/src/9/pc/devfloppy.8 - 664 sys sys 1047261706 0
+1047263468 29 d sys/src/9/pc/devi82365.8 - 664 sys sys 1047261698 0
+1047263468 30 d sys/src/9/pc/devip.8 - 664 sys sys 1047261715 0
+1047263468 31 d sys/src/9/pc/devkprof.8 - 664 sys sys 1047261710 0
+1047263468 32 d sys/src/9/pc/devlpt.8 - 664 sys sys 1047261712 0
+1047263468 33 d sys/src/9/pc/devmnt.8 - 664 sys sys 1047261703 0
+1047263468 34 d sys/src/9/pc/devmouse.8 - 664 sys sys 1047261691 0
+1047263468 35 d sys/src/9/pc/devpccard.8 - 664 sys sys 1047261707 0
+1047263468 36 d sys/src/9/pc/devpipe.8 - 664 sys sys 1047261710 0
+1047263468 37 d sys/src/9/pc/devpnp.8 - 664 sys sys 1047261691 0
+1047263468 38 d sys/src/9/pc/devproc.8 - 664 sys sys 1047261705 0
+1047263468 39 d sys/src/9/pc/devrealtime.8 - 664 sys sys 1047261717 0
+1047263468 40 d sys/src/9/pc/devroot.8 - 664 sys sys 1047261716 0
+1047263468 41 d sys/src/9/pc/devrtc.8 - 664 sys sys 1047261706 0
+1047263468 42 d sys/src/9/pc/devsd.8 - 664 sys sys 1047261712 0
+1047263468 43 d sys/src/9/pc/devsrv.8 - 664 sys sys 1047261704 0
+1047263468 44 d sys/src/9/pc/devssl.8 - 664 sys sys 1047261702 0
+1047263468 45 d sys/src/9/pc/devtls.8 - 664 sys sys 1047261690 0
+1047263468 46 d sys/src/9/pc/devtv.8 - 664 sys sys 1047261700 0
+1047263468 47 d sys/src/9/pc/devuart.8 - 664 sys sys 1047261708 0
+1047263468 48 d sys/src/9/pc/devusb.8 - 664 sys sys 1047261709 0
+1047263468 49 d sys/src/9/pc/devvga.8 - 664 sys sys 1047261717 0
+1047263468 50 d sys/src/9/pc/dma.8 - 664 sys sys 1047261690 0
+1047263468 51 d sys/src/9/pc/edf.8 - 664 sys sys 1047261691 0
+1047263468 52 d sys/src/9/pc/ether2000.8 - 664 sys sys 1047261689 0
+1047263468 53 d sys/src/9/pc/ether2114x.8 - 664 sys sys 1047261698 0
+1047263468 54 d sys/src/9/pc/ether589.8 - 664 sys sys 1047261709 0
+1047263468 55 d sys/src/9/pc/ether79c970.8 - 664 sys sys 1047261690 0
+1047263468 56 d sys/src/9/pc/ether8003.8 - 664 sys sys 1047261717 0
+1047263468 57 d sys/src/9/pc/ether8139.8 - 664 sys sys 1047261698 0
+1047263468 58 d sys/src/9/pc/ether82543gc.8 - 664 sys sys 1047261704 0
+1047263468 59 d sys/src/9/pc/ether82557.8 - 664 sys sys 1047261689 0
+1047263468 60 d sys/src/9/pc/ether83815.8 - 664 sys sys 1047261696 0
+1047263468 61 d sys/src/9/pc/ether8390.8 - 664 sys sys 1047261716 0
+1047263468 62 d sys/src/9/pc/etherec2t.8 - 664 sys sys 1047261689 0
+1047263468 63 d sys/src/9/pc/etherelnk3.8 - 664 sys sys 1047261690 0
+1047263468 64 d sys/src/9/pc/etherga620.8 - 664 sys sys 1047261715 0
+1047263468 65 d sys/src/9/pc/ethermedium.8 - 664 sys sys 1047261705 0
+1047263468 66 d sys/src/9/pc/ethersink.8 - 664 sys sys 1047261699 0
+1047263468 67 d sys/src/9/pc/ethersmc.8 - 664 sys sys 1047261705 0
+1047263468 68 d sys/src/9/pc/etherwavelan.8 - 664 sys sys 1047261689 0
+1047263468 69 d sys/src/9/pc/factotum.hack - 775 sys sys 1047261710 0
+1047263468 70 d sys/src/9/pc/factotum_hack.out - 775 sys sys 1047261726 0
+1047263468 71 d sys/src/9/pc/factotum_hack.root.s - 664 sys sys 1047261733 0
+1047263468 72 d sys/src/9/pc/fault.8 - 664 sys sys 1047261719 0
+1047263468 73 d sys/src/9/pc/i8253.8 - 664 sys sys 1047261687 0
+1047263468 74 d sys/src/9/pc/i8259.8 - 664 sys sys 1047261687 0
+1047263468 75 d sys/src/9/pc/icmp.8 - 664 sys sys 1047261713 0
+1047263468 76 d sys/src/9/pc/icmp6.8 - 664 sys sys 1047261702 0
+1047263468 77 d sys/src/9/pc/il.8 - 664 sys sys 1047261708 0
+1047263468 78 d sys/src/9/pc/inferno.8 - 664 sys sys 1047261716 0
+1047263468 79 d sys/src/9/pc/init.h - 664 sys sys 1047261687 0
+1047263468 80 d sys/src/9/pc/init9.8 - 664 sys sys 1047261687 0
+1047263468 81 d sys/src/9/pc/initcode.8 - 664 sys sys 1047261687 0
+1047263468 82 d sys/src/9/pc/ip.8 - 664 sys sys 1047261714 0
+1047263468 83 d sys/src/9/pc/ipaux.8 - 664 sys sys 1047261716 0
+1047263468 84 d sys/src/9/pc/ipifc.8 - 664 sys sys 1047261704 0
+1047263468 85 d sys/src/9/pc/iproute.8 - 664 sys sys 1047261712 0
+1047263468 86 d sys/src/9/pc/ipv6.8 - 664 sys sys 1047261707 0
+1047263468 87 d sys/src/9/pc/kbd.8 - 664 sys sys 1047261687 0
+1047263468 88 d sys/src/9/pc/l.8 - 664 sys sys 1047261686 0
+1047263468 89 d sys/src/9/pc/latin1.8 - 664 sys sys 1047261719 0
+1047263468 90 d sys/src/9/pc/main.8 - 664 sys sys 1047261723 0
+1047263468 91 d sys/src/9/pc/memory.8 - 664 sys sys 1047261687 0
+1047263468 92 d sys/src/9/pc/mmu.8 - 664 sys sys 1047261688 0
+1047263468 93 d sys/src/9/pc/mouse.8 - 664 sys sys 1047261696 0
+1047263468 94 d sys/src/9/pc/mp.8 - 664 sys sys 1047261709 0
+1047263468 95 d sys/src/9/pc/netdevmedium.8 - 664 sys sys 1047261718 0
+1047263468 96 d sys/src/9/pc/netif.8 - 664 sys sys 1047261711 0
+1047263468 97 d sys/src/9/pc/netlog.8 - 664 sys sys 1047261710 0
+1047263468 98 d sys/src/9/pc/nulledf.8 - 664 sys sys 1047261719 0
+1047263468 99 d sys/src/9/pc/nullmedium.8 - 664 sys sys 1047261717 0
+1047263468 100 d sys/src/9/pc/page.8 - 664 sys sys 1047261720 0
+1047263468 101 d sys/src/9/pc/parse.8 - 664 sys sys 1047261720 0
+1047263468 102 d sys/src/9/pc/pc.c - 664 sys sys 1047261687 0
+1047263468 103 d sys/src/9/pc/pci.8 - 664 sys sys 1047261696 0
+1047263468 104 d sys/src/9/pc/pcmciamodem.8 - 664 sys sys 1047261703 0
+1047263468 105 d sys/src/9/pc/pgrp.8 - 664 sys sys 1047261720 0
+1047263468 106 d sys/src/9/pc/pktmedium.8 - 664 sys sys 1047261701 0
+1047263468 107 d sys/src/9/pc/plan9l.8 - 664 sys sys 1047261687 0
+1047263468 108 d sys/src/9/pc/portclock.8 - 664 sys sys 1047261721 0
+1047263468 109 d sys/src/9/pc/print.8 - 664 sys sys 1047261705 0
+1047263468 110 d sys/src/9/pc/proc.8 - 664 sys sys 1047261721 0
+1047263468 111 d sys/src/9/pc/ptclbsum386.8 - 664 sys sys 1047261700 0
+1047263468 112 d sys/src/9/pc/qio.8 - 664 sys sys 1047261721 0
+1047263468 113 d sys/src/9/pc/qlock.8 - 664 sys sys 1047261720 0
+1047263468 114 d sys/src/9/pc/random.8 - 664 sys sys 1047261688 0
+1047263468 115 d sys/src/9/pc/rdb.8 - 664 sys sys 1047261688 0
+1047263468 116 d sys/src/9/pc/realtimesub.8 - 664 sys sys 1047261715 0
+1047263468 117 d sys/src/9/pc/rebootcmd.8 - 664 sys sys 1047261721 0
+1047263468 118 d sys/src/9/pc/screen.8 - 664 sys sys 1047261696 0
+1047263468 119 d sys/src/9/pc/sd53c8xx.8 - 664 sys sys 1047261718 0
+1047263468 120 d sys/src/9/pc/sdata.8 - 664 sys sys 1047261703 0
+1047263468 121 d sys/src/9/pc/sdmylex.8 - 664 sys sys 1047261701 0
+1047263468 122 d sys/src/9/pc/sdscsi.8 - 664 sys sys 1047261716 0
+1047263468 123 d sys/src/9/pc/segment.8 - 664 sys sys 1047261721 0
+1047263468 124 d sys/src/9/pc/swap.8 - 664 sys sys 1047261721 0
+1047263468 125 d sys/src/9/pc/sysfile.8 - 664 sys sys 1047261722 0
+1047263468 126 d sys/src/9/pc/sysproc.8 - 664 sys sys 1047261722 0
+1047263468 127 d sys/src/9/pc/taslock.8 - 664 sys sys 1047261722 0
+1047263468 128 d sys/src/9/pc/tcp.8 - 664 sys sys 1047261700 0
+1047263468 129 d sys/src/9/pc/tod.8 - 664 sys sys 1047261722 0
+1047263468 130 d sys/src/9/pc/trap.8 - 664 sys sys 1047261689 0
+1047263468 131 d sys/src/9/pc/uarti8250.8 - 664 sys sys 1047261689 0
+1047263468 132 d sys/src/9/pc/uartpci.8 - 664 sys sys 1047261714 0
+1047263468 133 d sys/src/9/pc/udp.8 - 664 sys sys 1047261714 0
+1047263468 134 d sys/src/9/pc/usbuhci.8 - 664 sys sys 1047261704 0
+1047263468 135 d sys/src/9/pc/vga.8 - 664 sys sys 1047261697 0
+1047263468 136 d sys/src/9/pc/vga3dfx.8 - 664 sys sys 1047261700 0
+1047263468 137 d sys/src/9/pc/vgaark2000pv.8 - 664 sys sys 1047261701 0
+1047263468 138 d sys/src/9/pc/vgabt485.8 - 664 sys sys 1047261690 0
+1047263468 139 d sys/src/9/pc/vgaclgd542x.8 - 664 sys sys 1047261696 0
+1047263468 140 d sys/src/9/pc/vgaclgd546x.8 - 664 sys sys 1047261716 0
+1047263468 141 d sys/src/9/pc/vgact65545.8 - 664 sys sys 1047261708 0
+1047263468 142 d sys/src/9/pc/vgacyber938x.8 - 664 sys sys 1047261696 0
+1047263468 143 d sys/src/9/pc/vgaet4000.8 - 664 sys sys 1047261700 0
+1047263468 144 d sys/src/9/pc/vgahiqvideo.8 - 664 sys sys 1047261714 0
+1047263468 145 d sys/src/9/pc/vgai81x.8 - 664 sys sys 1047261713 0
+1047263468 146 d sys/src/9/pc/vgamach64xx.8 - 664 sys sys 1047261702 0
+1047263468 147 d sys/src/9/pc/vgamga2164w.8 - 664 sys sys 1047261711 0
+1047263468 148 d sys/src/9/pc/vgamga4xx.8 - 664 sys sys 1047261690 0
+1047263468 149 d sys/src/9/pc/vganeomagic.8 - 664 sys sys 1047261702 0
+1047263468 150 d sys/src/9/pc/vganvidia.8 - 664 sys sys 1047261707 0
+1047263468 151 d sys/src/9/pc/vgargb524.8 - 664 sys sys 1047261697 0
+1047263468 152 d sys/src/9/pc/vgas3.8 - 664 sys sys 1047261703 0
+1047263468 153 d sys/src/9/pc/vgasavage.8 - 664 sys sys 1047261711 0
+1047263468 154 d sys/src/9/pc/vgat2r4.8 - 664 sys sys 1047261714 0
+1047263468 155 d sys/src/9/pc/vgatvp3020.8 - 664 sys sys 1047261711 0
+1047263468 156 d sys/src/9/pc/vgatvp3026.8 - 664 sys sys 1047261706 0
+1047263468 157 d sys/src/9/pc/vgavmware.8 - 664 sys sys 1047261717 0
+1047263468 158 d sys/src/9/pc/vgax.8 - 664 sys sys 1047261689 0
+1047263468 159 d sys/src/9/pc/wavelan.8 - 664 sys sys 1047261698 0
+1047263468 160 d sys/src/9/pc/xalloc.8 - 664 sys sys 1047261722 0
+1047265277 0 d sys/src/9/pc/bootpc_out.root.8 - 664 sys sys 1047261733 0
+1047265277 1 d sys/src/9/pc/devdup.8 - 664 sys sys 1047261703 0
+1047265277 2 d sys/src/9/pc/init.out - 775 sys sys 1047261687 0

+ 1 - 16
sys/src/9/alphapc/trap.c

@@ -238,23 +238,8 @@ intr(Ureg *ur)
 		if(ctl->eoi)
 			ctl->eoi(vno);
 
-		/* 
-		 *  preemptive scheduling.  to limit stack depth,
-		 *  make sure process has a chance to return from
-		 *  the current interrupt before being preempted a
-		 *  second time.
-		 */
 		if(ctl->isintr)
-		if(up && up->state == Running)
-		if(anyhigher())
-		if(up->preempted == 0)
-		if(!active.exiting){
-			up->preempted = 1;
-			sched();
-			splhi();
-			up->preempted = 0;
-			return;
-		}
+			preempted();
 	}
 	else if(vno >= VectorPIC && vno <= MaxVectorPIC){
 		/*

+ 25 - 20
sys/src/9/ip/arp.c

@@ -75,10 +75,10 @@ newarp6(Arp *arp, uchar *ip, Ipifc *ifc, int addrxt)
 	/* find oldest entry */
 	e = &arp->cache[NCACHE];
 	a = arp->cache;
-	t = a->used;
+	t = a->utime;
 	for(f = a; f < e; f++){
-		if(f->used < t){
-			t = f->used;
+		if(f->utime < t){
+			t = f->utime;
 			a = f;
 		}
 	}
@@ -124,11 +124,11 @@ newarp6(Arp *arp, uchar *ip, Ipifc *ifc, int addrxt)
 	*l = a;
 
 	memmove(a->ip, ip, sizeof(a->ip));
-	a->used = NOW;
-	a->time = 0;
+	a->utime = NOW;
+	a->ctime = a->utime;
 	a->type = m;
 
-	a->rxtat = NOW + ReTransTimer;
+	a->rtime = NOW + ReTransTimer;
 	a->rxtsrem = MAX_MULTICAST_SOLICIT;
 	a->ifc = ifc;
 	a->ifcid = ifc->ifcid;
@@ -165,8 +165,8 @@ cleanarpent(Arp *arp, Arpent *a)
 {
 	Arpent *f, **l;
 
-	a->used = 0;
-	a->time = 0;
+	a->utime = 0;
+	a->ctime = 0;
 	a->type = 0;
 	a->state = 0;
 	
@@ -227,7 +227,7 @@ arpget(Arp *arp, Block *bp, int version, Ipifc *ifc, uchar *ip, uchar *mac)
 		a = newarp6(arp, ip, ifc, (version != V4));
 		a->state = AWAIT;
 	}
-	a->used = NOW;
+	a->utime = NOW;
 	if(a->state == AWAIT){
 		if(bp != nil){
 			if(a->hold)
@@ -241,6 +241,11 @@ arpget(Arp *arp, Block *bp, int version, Ipifc *ifc, uchar *ip, uchar *mac)
 	}
 
 	memmove(mac, a->mac, a->type->maclen);
+
+	/* remove old entries */
+	if(NOW - a->ctime > 15*60*1000)
+		cleanarpent(arp, a);
+
 	qunlock(arp);
 	return nil;
 }
@@ -280,7 +285,7 @@ arpresolve(Arp *arp, Arpent *a, Medium *type, uchar *mac)
 	memmove(a->mac, mac, type->maclen);
 	a->type = type;
 	a->state = AOK;
-	a->used = NOW;
+	a->utime = NOW;
 	bp = a->hold;
 	a->hold = nil;
 	qunlock(arp);
@@ -308,12 +313,12 @@ arpenter(Fs *fs, int version, uchar *ip, uchar *mac, int n, int refresh)
 
 	switch(version){
 	case V4:
-		r = v4lookup(fs, ip);
+		r = v4lookup(fs, ip, nil);
 		v4tov6(v6ip, ip);
 		ip = v6ip;
 		break;
 	case V6:
-		r = v6lookup(fs, ip);
+		r = v6lookup(fs, ip, nil);
 		break;
 	default:
 		panic("arpenter: version %d", version);
@@ -375,7 +380,8 @@ arpenter(Fs *fs, int version, uchar *ip, uchar *mac, int n, int refresh)
 					freeb(bp);
 				bp = next;
 			}
-			a->used = NOW;
+			a->utime = NOW;
+			a->ctime = a->utime;
 			return;
 		}
 	}
@@ -421,7 +427,7 @@ arpwrite(Fs *fs, char *s, int len)
 			memset(a->mac, 0, sizeof(a->mac));
 			a->hash = nil;
 			a->state = 0;
-			a->used = 0;
+			a->utime = 0;
 			while(a->hold != nil){
 				bp = a->hold->list;
 				freeblist(a->hold);
@@ -441,9 +447,9 @@ arpwrite(Fs *fs, char *s, int len)
 		case 3:
 			parseip(ip, f[1]);
 			if(isv4(ip))
-				r = v4lookup(fs, ip+IPv4off);
+				r = v4lookup(fs, ip+IPv4off, nil);
 			else
-				r = v6lookup(fs, ip);
+				r = v6lookup(fs, ip, nil);
 			if(r == nil)
 				error("Destination unreachable");
 			m = r->ifc->m;
@@ -532,7 +538,7 @@ rxmitsols(Arp *arp)
 		nrxt = 0;
 		goto dodrops; 		//return nrxt;
 	}
-	nrxt = a->rxtat - NOW;
+	nrxt = a->rtime - NOW;
 	if(nrxt > 3*ReTransTimer/4) 
 		goto dodrops; 		//return nrxt;
 
@@ -589,14 +595,13 @@ rxmitsols(Arp *arp)
 	*l = a;
 	a->rxtsrem--;
 	a->nextrxt = nil;
-	a->time = NOW;
-	a->rxtat = NOW + ReTransTimer;
+	a->rtime = NOW + ReTransTimer;
 
 	a = arp->rxmt;
 	if(a==nil)
 		nrxt = 0;
 	else 
-		nrxt = a->rxtat - NOW;
+		nrxt = a->rtime - NOW;
 
 dodrops:
 	xp = arp->dropf;

+ 4 - 0
sys/src/9/ip/devip.c

@@ -568,6 +568,8 @@ closeconv(Conv *cv)
 	while((mp = cv->multi) != nil)
 		ipifcremmulti(cv, mp->ma, mp->ia);
 
+	cv->r = nil;
+	cv->rgen = 0;
 	cv->p->close(cv);
 	cv->state = Idle;
 	qunlock(cv);
@@ -1290,6 +1292,8 @@ retry:
 	c->state = Idle;
 	ipmove(c->laddr, IPnoaddr);
 	ipmove(c->raddr, IPnoaddr);
+	c->r = nil;
+	c->rgen = 0;
 	c->lport = 0;
 	c->rport = 0;
 	c->restricted = 0;

+ 1 - 1
sys/src/9/ip/esp.c

@@ -300,7 +300,7 @@ espkick(void *x)
 
 	qunlock(c);
 	//print("esp: pass down: %uld\n", BLEN(bp));
-	ipoput4(c->p->f, bp, 0, c->ttl, c->tos);
+	ipoput4(c->p->f, bp, 0, c->ttl, c->tos, c);
 }
 
 void

+ 5 - 5
sys/src/9/ip/ethermedium.c

@@ -453,7 +453,7 @@ sendarp(Ipifc *ifc, Arpent *a)
 	Etherrock *er = ifc->arg;
 
 	/* don't do anything if it's been less than a second since the last */
-	if(NOW - a->time < 1000){
+	if(NOW - a->ctime < 1000){
 		arprelease(er->f->arp, a);
 		return;
 	}
@@ -467,7 +467,7 @@ sendarp(Ipifc *ifc, Arpent *a)
 	}
 
 	/* try to keep it around for a second more */
-	a->time = NOW;
+	a->ctime = NOW;
 	arprelease(er->f->arp, a);
 
 	n = sizeof(Etherarp);
@@ -504,7 +504,7 @@ resolveaddr6(Ipifc *ifc, Arpent *a)
 	uchar ipsrc[IPaddrlen];
 
 	/* don't do anything if it's been less than a second since the last */
-	if(NOW - a->time < ReTransTimer){
+	if(NOW - a->ctime < ReTransTimer){
 		arprelease(er->f->arp, a);
 		return;
 	}
@@ -518,8 +518,8 @@ resolveaddr6(Ipifc *ifc, Arpent *a)
 	}
 
 	/* try to keep it around for a second more */
-	a->time = NOW;
-	a->rxtat = NOW + ReTransTimer;
+	a->ctime = NOW;
+	a->rtime = NOW + ReTransTimer;
 	if(a->rxtsrem <= 0) {
 		arprelease(er->f->arp, a);
 		return;

+ 1 - 1
sys/src/9/ip/gre.c

@@ -158,7 +158,7 @@ grekick(void *x, Block *bp)
 	ghp->frag[0] = 0;
 	ghp->frag[1] = 0;
 
-	ipoput4(c->p->f, bp, 0, c->ttl, c->tos);
+	ipoput4(c->p->f, bp, 0, c->ttl, c->tos, nil);
 }
 
 static void

+ 4 - 4
sys/src/9/ip/icmp.c

@@ -183,7 +183,7 @@ icmpkick(void *x, Block *bp)
 	memset(p->cksum, 0, sizeof(p->cksum));
 	hnputs(p->cksum, ptclcsum(bp, ICMP_IPSIZE, blocklen(bp) - ICMP_IPSIZE));
 	ipriv->stats[OutMsgs]++;
-	ipoput4(c->p->f, bp, 0, c->ttl, c->tos);
+	ipoput4(c->p->f, bp, 0, c->ttl, c->tos, nil);
 }
 
 extern void
@@ -209,7 +209,7 @@ icmpttlexceeded(Fs *f, uchar *ia, Block *bp)
 	hnputs(np->seq, 0);
 	memset(np->cksum, 0, sizeof(np->cksum));
 	hnputs(np->cksum, ptclcsum(nbp, ICMP_IPSIZE, blocklen(nbp) - ICMP_IPSIZE));
-	ipoput4(f, nbp, 0, MAXTTL, DFLTTOS);
+	ipoput4(f, nbp, 0, MAXTTL, DFLTTOS, nil);
 
 }
 
@@ -248,7 +248,7 @@ icmpunreachable(Fs *f, Block *bp, int code, int seq)
 	hnputs(np->seq, seq);
 	memset(np->cksum, 0, sizeof(np->cksum));
 	hnputs(np->cksum, ptclcsum(nbp, ICMP_IPSIZE, blocklen(nbp) - ICMP_IPSIZE));
-	ipoput4(f, nbp, 0, MAXTTL, DFLTTOS);
+	ipoput4(f, nbp, 0, MAXTTL, DFLTTOS, nil);
 }
 
 extern void
@@ -362,7 +362,7 @@ icmpiput(Proto *icmp, Ipifc*, Block *bp)
 			bp = trimblock(bp, 0, iplen);
 		r = mkechoreply(bp);
 		ipriv->out[EchoReply]++;
-		ipoput4(icmp->f, r, 0, MAXTTL, DFLTTOS);
+		ipoput4(icmp->f, r, 0, MAXTTL, DFLTTOS, nil);
 		break;
 	case Unreachable:
 		if(p->code > 5 || p->code < 0)

+ 7 - 7
sys/src/9/ip/icmp6.c

@@ -270,7 +270,7 @@ icmpkick6(void *x, Block *bp)
 	p->vcf[0] = 0x06 << 4;
 	if(p->type <= Maxtype6)	
 		ipriv->out[p->type]++;
-	ipoput6(c->p->f, bp, 0, c->ttl, c->tos);
+	ipoput6(c->p->f, bp, 0, c->ttl, c->tos, nil);
 }
 
 char*
@@ -382,7 +382,7 @@ icmpns(Fs *f, uchar* src, int suni, uchar* targ, int tuni, uchar* mac)
 	np->vcf[0] = 0x06 << 4;
 	ipriv->out[NbrSolicit]++;
 	netlog(f, Logicmp, "sending neighbor solicitation %I\n", targ);
-	ipoput6(f, nbp, 0, MAXTTL, DFLTTOS);
+	ipoput6(f, nbp, 0, MAXTTL, DFLTTOS, nil);
 }
 
 /*
@@ -417,7 +417,7 @@ icmpna(Fs *f, uchar* src, uchar* dst, uchar* targ, uchar* mac, uchar flags)
 	np->vcf[0] = 0x06 << 4;
 	ipriv->out[NbrAdvert]++;
 	netlog(f, Logicmp, "sending neighbor advertisement %I\n", src);
-	ipoput6(f, nbp, 0, MAXTTL, DFLTTOS);
+	ipoput6(f, nbp, 0, MAXTTL, DFLTTOS, nil);
 }
 
 extern void
@@ -464,7 +464,7 @@ icmphostunr(Fs *f, Ipifc *ifc, Block *bp, int code, int free)
 	if(free)
 		ipiput6(f, ifc, nbp);
 	else {
-		ipoput6(f, nbp, 0, MAXTTL, DFLTTOS);
+		ipoput6(f, nbp, 0, MAXTTL, DFLTTOS, nil);
 		return;
 	}
 
@@ -508,7 +508,7 @@ icmpttlexceeded6(Fs *f, Ipifc *ifc, Block *bp)
 	np->ttl = HOP_LIMIT;
 	np->vcf[0] = 0x06 << 4;
 	ipriv->out[TimeExceedV6]++;
-	ipoput6(f, nbp, 0, MAXTTL, DFLTTOS);
+	ipoput6(f, nbp, 0, MAXTTL, DFLTTOS, nil);
 }
 
 extern void
@@ -547,7 +547,7 @@ icmppkttoobig6(Fs *f, Ipifc *ifc, Block *bp)
 	np->ttl = HOP_LIMIT;
 	np->vcf[0] = 0x06 << 4;
 	ipriv->out[PacketTooBigV6]++;
-	ipoput6(f, nbp, 0, MAXTTL, DFLTTOS);
+	ipoput6(f, nbp, 0, MAXTTL, DFLTTOS, nil);
 }
 
 /*
@@ -745,7 +745,7 @@ icmpiput6(Proto *icmp, Ipifc *ipifc, Block *bp)
 	case EchoRequestV6:
 		r = mkechoreply6(bp);
 		ipriv->out[EchoReply]++;
-		ipoput6(icmp->f, r, 0, MAXTTL, DFLTTOS);
+		ipoput6(icmp->f, r, 0, MAXTTL, DFLTTOS, nil);
 		break;
 
 	case UnreachableV6:

+ 1 - 1
sys/src/9/ip/igmp.c

@@ -97,7 +97,7 @@ igmpsendreport(Media *m, byte *addr)
 	hnputs(p->igmpcksum, ptclcsum(bp, IGMP_IPHDRSIZE, IGMP_HDRSIZE));
 	netlog(Logigmp, "igmpreport %I\n", p->group);
 	stats.outreports++;
-	ipoput4(bp, 0, 1, DFLTTOS);	/* TTL of 1 */
+	ipoput4(bp, 0, 1, DFLTTOS, nil);	/* TTL of 1 */
 }
 
 static int

+ 4 - 4
sys/src/9/ip/il.c

@@ -408,7 +408,7 @@ ilkick(void *x, Block *bp)
 
 	if(later(NOW, ic->timeout, nil))
 		ilsettimeout(ic);
-	ipoput4(f, bp, 0, c->ttl, c->tos);
+	ipoput4(f, bp, 0, c->ttl, c->tos, c);
 	priv->stats[OutMsgs]++;
 }
 
@@ -820,7 +820,7 @@ ilrexmit(Ilcb *ic)
 
 	ilbackoff(ic);
 
-	ipoput4(c->p->f, nb, 0, ic->conv->ttl, ic->conv->tos);
+	ipoput4(c->p->f, nb, 0, c->ttl, c->tos, c);
 
 	/* statistics */
 	ic->rxtot++;
@@ -1027,7 +1027,7 @@ if(ipc->p==nil)
 		iltype[ih->iltype], nhgetl(ih->ilid), nhgetl(ih->ilack), 
 		nhgets(ih->ilsrc), nhgets(ih->ildst));
 
-	ipoput4(ipc->p->f, bp, 0, ttl, tos);
+	ipoput4(ipc->p->f, bp, 0, ttl, tos, ipc);
 }
 
 void
@@ -1061,7 +1061,7 @@ ilreject(Fs *f, Ilhdr *inih)
 	if(ilcksum)
 		hnputs(ih->ilsum, ptclcsum(bp, IL_IPSIZE, IL_HDRSIZE));
 
-	ipoput4(f, bp, 0, MAXTTL, DFLTTOS);
+	ipoput4(f, bp, 0, MAXTTL, DFLTTOS, nil);
 }
 
 void

+ 11 - 9
sys/src/9/ip/ip.c

@@ -221,7 +221,7 @@ iprouting(Fs *f, int on)
 }
 
 int
-ipoput4(Fs *f, Block *bp, int gating, int ttl, int tos)
+ipoput4(Fs *f, Block *bp, int gating, int ttl, int tos, Conv *c)
 {
 	Ipifc *ifc;
 	uchar *gate;
@@ -259,7 +259,7 @@ ipoput4(Fs *f, Block *bp, int gating, int ttl, int tos)
 		goto free;
 	}
 
-	r = v4lookup(f, eh->dst);
+	r = v4lookup(f, eh->dst, c);
 	if(r == nil){
 		ip->stats[OutNoRoutes]++;
 		netlog(f, Logip, "no interface %V\n", eh->dst);
@@ -273,7 +273,7 @@ ipoput4(Fs *f, Block *bp, int gating, int ttl, int tos)
 	else
 	if(r->type & (Rbcast|Rmulti)) {
 		gate = eh->dst;
-		sr = v4lookup(f, eh->src);
+		sr = v4lookup(f, eh->src, nil);
 		if(sr != nil && (sr->type & Runi))
 			ifc = sr->ifc;
 	}
@@ -415,7 +415,7 @@ ipiput4(Fs *f, Ipifc *ifc, Block *bp)
 	int notforme;
 	uchar *dp, v6dst[IPaddrlen];
 	IP *ip;
-	Route *r, *sr;
+	Route *r;
 
 	if(BLKIPVER(bp) != IP_VER4) {
 		ipiput6(f, ifc, bp);
@@ -476,15 +476,17 @@ ipiput4(Fs *f, Ipifc *ifc, Block *bp)
 
 	/* route */
 	if(notforme) {
+		Conv conv;
+
 		if(!ip->iprouting){
 			freeb(bp);
 			return;
 		}
-		/* don't forward to source's network */
-		sr = v4lookup(f, h->src);
-		r = v4lookup(f, h->dst);
 
-		if(r == nil || sr == r){
+		/* don't forward to source's network */
+		conv.r = nil;
+		r = v4lookup(f, h->dst, &conv);
+		if(r != nil && r->ifc == ifc){
 			ip->stats[OutDiscards]++;
 			freeblist(bp);
 			return;
@@ -516,7 +518,7 @@ ipiput4(Fs *f, Ipifc *ifc, Block *bp)
 		ip->stats[ForwDatagrams]++;
 		tos = h->tos;
 		hop = h->ttl;
-		ipoput4(f, bp, 1, hop - 1, tos);
+		ipoput4(f, bp, 1, hop - 1, tos, &conv);
 		return;
 	}
 

+ 11 - 9
sys/src/9/ip/ip.h

@@ -35,7 +35,7 @@ enum
 	Maxproto=	20,
 	Nhash=		64,
 	Maxincall=	5,
-	Nchans=		512,
+	Nchans=		1024,
 	MAClen=		16,		/* longest mac address */
 
 	MAXTTL=		255,
@@ -88,7 +88,6 @@ struct Conv
 	ushort	lport;			/* local port number */
 	ushort	rport;			/* remote port number */
 
-
 	char	*owner;			/* protections */
 	int	perm;
 	int	inuse;			/* opens of listen/data/ctl */
@@ -118,6 +117,9 @@ struct Conv
 	Ipmulti	*multi;			/* multicast bindings for this interface */
 
 	void*	ptcl;			/* protocol specific stuff */
+
+	Route	*r;			/* last route used */
+	ulong	rgen;			/* routetable generation for *r */
 };
 
 struct Medium
@@ -486,8 +488,8 @@ extern void	v4addroute(Fs *f, char *tag, uchar *a, uchar *mask, uchar *gate, int
 extern void	v6addroute(Fs *f, char *tag, uchar *a, uchar *mask, uchar *gate, int type);
 extern void	v4delroute(Fs *f, uchar *a, uchar *mask, int dolock);
 extern void	v6delroute(Fs *f, uchar *a, uchar *mask, int dolock);
-extern Route*	v4lookup(Fs *f, uchar *a);
-extern Route*	v6lookup(Fs *f, uchar *a);
+extern Route*	v4lookup(Fs *f, uchar *a, Conv *c);
+extern Route*	v6lookup(Fs *f, uchar *a, Conv *c);
 extern long	routeread(Fs *f, char*, ulong, int);
 extern long	routewrite(Fs *f, Chan*, char*, int);
 extern void	routetype(int, char*);
@@ -521,11 +523,11 @@ struct Arpent
 	Arpent*	hash;
 	Block*	hold;
 	Block*	last;
-	uint	time;
-	uint	used;
+	uint	ctime;			/* time entry was created or refreshed */
+	uint	utime;			/* time entry was last used */
 	uchar	state;
 	Arpent	*nextrxt;		/* re-transmit chain */
-	uint	rxtat;
+	uint	rtime;			/* time for next retransmission */
 	uchar	rxtsrem;
 	Ipifc	*ifc;
 	uchar	ifcid;			/* must match ifc->id */
@@ -620,8 +622,8 @@ extern void	icmpttlexceeded(Fs*, uchar*, Block*);
 extern ushort	ipcsum(uchar*);
 extern void	ipiput4(Fs*, Ipifc*, Block*);
 extern void	ipiput6(Fs*, Ipifc*, Block*);
-extern int	ipoput4(Fs*, Block*, int, int, int);
-extern int	ipoput6(Fs*, Block*, int, int, int);
+extern int	ipoput4(Fs*, Block*, int, int, int, Conv*);
+extern int	ipoput6(Fs*, Block*, int, int, int, Conv*);
 extern int	ipstats(Fs*, char*, int);
 extern ushort	ptclbsum(uchar*, int);
 extern ushort	ptclcsum(Block*, int, int);

+ 3 - 3
sys/src/9/ip/ipifc.c

@@ -1291,7 +1291,7 @@ findlocalip(Fs *f, uchar *local, uchar *remote)
 	USED(atype);
 	USED(atypel);
 	qlock(f->ipifc);
-	r = v6lookup(f, remote);
+	r = v6lookup(f, remote, nil);
  	version = (memcmp(remote, v4prefix, IPv4off) == 0) ? V4 : V6;
 	
 	if(r != nil){
@@ -1424,7 +1424,7 @@ ipproxyifc(Fs *f, Ipifc *ifc, uchar *ip)
 	Iplifc *lifc;
 
 	/* see if this is a direct connected pt to pt address */
-	r = v6lookup(f, ip);
+	r = v6lookup(f, ip, nil);
 	if(r == nil)
 		return 0;
 	if((r->type & (Rifc|Rptpt|Rproxy)) != (Rifc|Rptpt|Rproxy))
@@ -1648,7 +1648,7 @@ adddefroute6(Fs *f, uchar *gate, int force)
 {
 	Route *r;
 
-	r = v6lookup(f, v6Unspecified);
+	r = v6lookup(f, v6Unspecified, nil);
 	if(r!=nil) 
 	if(!(force) && (strcmp(r->tag,"ra")!=0))	// route entries generated
 		return;			// by all other means take

+ 2 - 2
sys/src/9/ip/ipmux.c

@@ -665,10 +665,10 @@ ipmuxkick(void *x)
 	else {
 		Ip4hdr *ih4 = (Ip4hdr*)(bp->rp);
 		if((ih4->vihl)&0xF0 != 0x60)
-			ipoput4(c->p->f, bp, 0, ih4->ttl, ih4->tos);
+			ipoput4(c->p->f, bp, 0, ih4->ttl, ih4->tos, nil);
 		else {
 			ih6 = (struct Ip6hdr*)ih4;
-			ipoput6(c->p->f, bp, 0, ih6->ttl, 0);
+			ipoput6(c->p->f, bp, 0, ih6->ttl, 0, nil);
 		}
 	}
 }

+ 22 - 3
sys/src/9/ip/iproute.c

@@ -15,6 +15,7 @@ static void	calcd(Route*);
 Route*	v4freelist;
 Route*	v6freelist;
 RWlock	routelock;
+ulong	v4routegeneration, v6routegeneration;
 
 static void
 freeroute(Route *r)
@@ -316,6 +317,7 @@ v4addroute(Fs *f, char *tag, uchar *a, uchar *mask, uchar *gate, int type)
 		}
 		wunlock(&routelock);
 	}
+	v4routegeneration++;
 
 	ipifcaddroute(f, Rv4, a, mask, gate, type);
 }
@@ -361,6 +363,7 @@ v6addroute(Fs *f, char *tag, uchar *a, uchar *mask, uchar *gate, int type)
 		}
 		wunlock(&routelock);
 	}
+	v6routegeneration++;
 
 	ipifcaddroute(f, 0, a, mask, gate, type);
 }
@@ -429,6 +432,7 @@ v4delroute(Fs *f, uchar *a, uchar *mask, int dolock)
 		if(dolock)
 			wunlock(&routelock);
 	}
+	v4routegeneration++;
 
 	ipifcremroute(f, Rv4, a, mask);
 }
@@ -472,17 +476,21 @@ v6delroute(Fs *f, uchar *a, uchar *mask, int dolock)
 		if(dolock)
 			wunlock(&routelock);
 	}
+	v6routegeneration++;
 
 	ipifcremroute(f, 0, a, mask);
 }
 
 Route*
-v4lookup(Fs *f, uchar *a)
+v4lookup(Fs *f, uchar *a, Conv *c)
 {
 	Route *p, *q;
 	ulong la;
 	uchar gate[IPaddrlen];
 
+	if(c != nil && c->r != nil && c->rgen == v4routegeneration)
+		return c->r;
+
 	la = nhgetl(a);
 	q = nil;
 	for(p=f->v4root[V4H(la)]; p;)
@@ -506,12 +514,16 @@ v4lookup(Fs *f, uchar *a)
 			return nil;
 		q->ifcid = q->ifc->ifcid;
 	}
+	if(c != nil){
+		c->r = q;
+		c->rgen = v4routegeneration;
+	}
 
 	return q;
 }
 
 Route*
-v6lookup(Fs *f, uchar *a)
+v6lookup(Fs *f, uchar *a, Conv *c)
 {
 	Route *p, *q;
 	ulong la[IPllen];
@@ -520,11 +532,14 @@ v6lookup(Fs *f, uchar *a)
 	uchar gate[IPaddrlen];
 
 	if(memcmp(a, v4prefix, IPv4off) == 0){
-		q = v4lookup(f, a+IPv4off);
+		q = v4lookup(f, a+IPv4off, c);
 		if(q != nil)
 			return q;
 	}
 
+	if(c != nil && c->r != nil && c->rgen == v6routegeneration)
+		return c->r;
+
 	for(h = 0; h < IPllen; h++)
 		la[h] = nhgetl(a+4*h);
 
@@ -568,6 +583,10 @@ next:		;
 			return nil;
 		q->ifcid = q->ifc->ifcid;
 	}
+	if(c != nil){
+		c->r = q;
+		c->rgen = v6routegeneration;
+	}
 	
 	return q;
 }

+ 6 - 6
sys/src/9/ip/ipv6.c

@@ -132,7 +132,7 @@ struct IP
 };
 
 int
-ipoput6(Fs *f, Block *bp, int gating, int ttl, int tos)
+ipoput6(Fs *f, Block *bp, int gating, int ttl, int tos, Conv *c)
 {
 	int tentative;
 	Ipifc *ifc;
@@ -179,7 +179,7 @@ ipoput6(Fs *f, Block *bp, int gating, int ttl, int tos)
 		goto free;
 	}
 
-	r = v6lookup(f, eh->dst);
+	r = v6lookup(f, eh->dst, c);
 	if(r == nil){
 //		print("no route for %I, src %I free\n", eh->dst, eh->src);
 		ip->stats[OutNoRoutes]++;
@@ -194,7 +194,7 @@ ipoput6(Fs *f, Block *bp, int gating, int ttl, int tos)
 	else
 	if(r->type & (Rbcast|Rmulti)) {
 		gate = eh->dst;
-		sr = v6lookup(f, eh->src);
+		sr = v6lookup(f, eh->src, nil);
 		if(sr != nil && (sr->type & Runi))
 			ifc = sr->ifc;
 	}
@@ -392,8 +392,8 @@ ipiput6(Fs *f, Ipifc *ifc, Block *bp)
 			return;
 		}
 		/* don't forward to source's network */
-		sr = v6lookup(f, h->src);
-		r = v6lookup(f, h->dst);
+		sr = v6lookup(f, h->src, nil);
+		r = v6lookup(f, h->dst, nil);
 
 		if(r == nil || sr == r){
 			ip->stats[OutDiscards]++;
@@ -420,7 +420,7 @@ ipiput6(Fs *f, Ipifc *ifc, Block *bp)
 		h = (Ip6hdr *) (bp->rp);
 		tos = IPV6CLASS(h);
 		hop = h->ttl;
-		ipoput6(f, bp, 1, hop-1, tos);
+		ipoput6(f, bp, 1, hop-1, tos, nil);
 		return;
 	}
 

+ 1 - 1
sys/src/9/ip/rudp.c

@@ -322,7 +322,7 @@ doipoput(Conv *c, Fs *f, Block *bp, int x, int ttl, int tos)
 	if(ucb->randdrop && nrand(100) < ucb->randdrop)
 		freeblist(bp);
 	else
-		ipoput4(f, bp, x, ttl, tos);
+		ipoput4(f, bp, x, ttl, tos, nil);
 }
 
 int

+ 10 - 10
sys/src/9/ip/tcp.c

@@ -1291,13 +1291,13 @@ sndrst(Proto *tcp, uchar *source, uchar *dest, ushort length, Tcp *seg, uchar ve
 		hbp = htontcp4(seg, nil, &ph4, nil);
 		if(hbp == nil)
 			return;
-		ipoput4(tcp->f, hbp, 0, MAXTTL, DFLTTOS);
+		ipoput4(tcp->f, hbp, 0, MAXTTL, DFLTTOS, nil);
 		break;
 	case V6:
 		hbp = htontcp6(seg, nil, &ph6, nil);
 		if(hbp == nil)
 			return;
-		ipoput6(tcp->f, hbp, 0, MAXTTL, DFLTTOS);
+		ipoput6(tcp->f, hbp, 0, MAXTTL, DFLTTOS, nil);
 		break;
 	default:
 		panic("sndrst2: version %d", version);
@@ -1332,12 +1332,12 @@ tcphangup(Conv *s)
 			case V4:
 				tcb->protohdr.tcp4hdr.vihl = IP_VER4;
 				hbp = htontcp4(&seg, nil, &tcb->protohdr.tcp4hdr, tcb);
-				ipoput4(s->p->f, hbp, 0, s->ttl, s->tos);
+				ipoput4(s->p->f, hbp, 0, s->ttl, s->tos, s);
 				break;
 			case V6:
 				tcb->protohdr.tcp6hdr.vcf[0] = IP_VER6;
 				hbp = htontcp6(&seg, nil, &tcb->protohdr.tcp6hdr, tcb);
-				ipoput6(s->p->f, hbp, 0, s->ttl, s->tos);
+				ipoput6(s->p->f, hbp, 0, s->ttl, s->tos, s);
 				break;
 			default:
 				panic("tcphangup: version %d", s->ipversion);
@@ -1409,13 +1409,13 @@ sndsynack(Proto *tcp, Limbo *lp)
 		hbp = htontcp4(&seg, nil, &ph4, nil);
 		if(hbp == nil)
 			return -1;
-		ipoput4(tcp->f, hbp, 0, MAXTTL, DFLTTOS);
+		ipoput4(tcp->f, hbp, 0, MAXTTL, DFLTTOS, nil);
 		break;
 	case V6:
 		hbp = htontcp6(&seg, nil, &ph6, nil);
 		if(hbp == nil)
 			return -1;
-		ipoput6(tcp->f, hbp, 0, MAXTTL, DFLTTOS);
+		ipoput6(tcp->f, hbp, 0, MAXTTL, DFLTTOS, nil);
 		break;
 	default:
 		panic("sndsnack: version %d", lp->version);
@@ -2585,13 +2585,13 @@ tcpoutput(Conv *s)
 
 		switch(version){
 		case V4:
-			if(ipoput4(f, hbp, 0, s->ttl, s->tos) < 0){
+			if(ipoput4(f, hbp, 0, s->ttl, s->tos, s) < 0){
 				/* a negative return means no route */
 				localclose(s, "no route");
 			}
 			break;
 		case V6:
-			if(ipoput6(f, hbp, 0, s->ttl, s->tos) < 0){
+			if(ipoput6(f, hbp, 0, s->ttl, s->tos, s) < 0){
 				/* a negative return means no route */
 				localclose(s, "no route");
 			}
@@ -2648,7 +2648,7 @@ tcpsendka(Conv *s)
 			freeblist(dbp);
 			return;
 		}
-		ipoput4(s->p->f, hbp, 0, s->ttl, s->tos);
+		ipoput4(s->p->f, hbp, 0, s->ttl, s->tos, s);
 	}
 	else {
 		/* Build header, link data and compute cksum */
@@ -2658,7 +2658,7 @@ tcpsendka(Conv *s)
 			freeblist(dbp);
 			return;
 		}
-		ipoput6(s->p->f, hbp, 0, s->ttl, s->tos);
+		ipoput6(s->p->f, hbp, 0, s->ttl, s->tos, s);
 	}
 }
 

+ 7 - 2
sys/src/9/ip/udp.c

@@ -188,6 +188,7 @@ udpkick(void *x, Block *bp)
 	Udppriv *upriv;
 	Fs *f;
 	int version;
+	Conv *rc;
 
 	upriv = c->p->priv;
 	f = c->p->f;
@@ -269,12 +270,14 @@ udpkick(void *x, Block *bp)
 			v6tov4(uh4->udpdst, raddr);
 			hnputs(uh4->udpdport, rport);
 			v6tov4(uh4->udpsrc, laddr);
+			rc = nil;
 		} else {
 			v6tov4(uh4->udpdst, c->raddr);
 			hnputs(uh4->udpdport, c->rport);
 			if(ipcmp(c->laddr, IPnoaddr) == 0)
 				findlocalip(f, c->laddr, c->raddr);
 			v6tov4(uh4->udpsrc, c->laddr);
+			rc = c;
 		}
 		hnputs(uh4->udpsport, c->lport);
 		hnputs(uh4->udplen, ptcllen);
@@ -283,7 +286,7 @@ udpkick(void *x, Block *bp)
 		hnputs(uh4->udpcksum, 
 		       ptclcsum(bp, UDP4_PHDR_OFF, dlen+UDP_UDPHDR_SZ+UDP4_PHDR_SZ));
 		uh4->vihl = IP_VER4;
-		ipoput4(f, bp, 0, c->ttl, c->tos);
+		ipoput4(f, bp, 0, c->ttl, c->tos, rc);
 		break;
 
 	case V6:
@@ -302,12 +305,14 @@ udpkick(void *x, Block *bp)
 			ipmove(uh6->udpdst, raddr);
 			hnputs(uh6->udpdport, rport);
 			ipmove(uh6->udpsrc, laddr);
+			rc = nil;
 		} else {
 			ipmove(uh6->udpdst, c->raddr);
 			hnputs(uh6->udpdport, c->rport);
 			if(ipcmp(c->laddr, IPnoaddr) == 0)
 				findlocalip(f, c->laddr, c->raddr);
 			ipmove(uh6->udpsrc, c->laddr);
+			rc = c;
 		}
 		hnputs(uh6->udpsport, c->lport);
 		hnputs(uh6->udplen, ptcllen);
@@ -319,7 +324,7 @@ udpkick(void *x, Block *bp)
 		uh6->viclfl[0] = IP_VER6;
 		hnputs(uh6->len, ptcllen);
 		uh6->nextheader = IP_UDPPROTO;
-		ipoput6(f, bp, 0, c->ttl, c->tos);
+		ipoput6(f, bp, 0, c->ttl, c->tos, rc);
 		break;
 
 	default:

+ 1 - 16
sys/src/9/mtx/trap.c

@@ -386,22 +386,7 @@ intr(Ureg *ureg)
 	if(ctl->eoi)
 		ctl->eoi(vno);
 
-	/* 
-	 *  preemptive scheduling.  to limit stack depth,
-	 *  make sure process has a chance to return from
-	 *  the current interrupt before being preempted a
-	 *  second time.
-	 */
-	if(up && up->state == Running)
-	if(anyhigher())
-	if(up->preempted == 0)
-	if(!active.exiting){
-		up->preempted = 1;
-		sched();
-		splhi();
-		up->preempted = 0;
-		return;
-	}
+	preempted();
 }
 
 char*

+ 3 - 18
sys/src/9/pc/trap.c

@@ -310,26 +310,11 @@ trap(Ureg* ureg)
 		if(ctl->eoi)
 			ctl->eoi(vno);
 
-		/* 
-		 *  preemptive scheduling.  to limit stack depth,
-		 *  make sure process has a chance to return from
-		 *  the current interrupt before being preempted a
-		 *  second time.
-		 */
-		if(ctl->isintr && ctl->irq != IrqTIMER && ctl->irq != IrqCLOCK)
-		if(up && up->state == Running)
-		if(anyhigher())
-		if(up->preempted == 0)
-		if(!active.exiting){
-			up->preempted = 1;
+		if(ctl->isintr){
 			intrtime(m, vno);
-			sched();
-			splhi();
-			up->preempted = 0;
-			return;
+			if(up && ctl->irq != IrqTIMER && ctl->irq != IrqCLOCK)
+				preempted();
 		}
-		if(ctl->isintr)
-			intrtime(m, vno);
 	}
 	else if(vno <= nelem(excname) && user){
 		spllo();

+ 15 - 20
sys/src/9/port/devproc.c

@@ -45,6 +45,8 @@ enum
 	CMstop,
 	CMwaitstop,
 	CMwired,
+	CMfair,
+	CMunfair,
 };
 
 #define	STATSIZE	(2*KNAMELEN+12+9*12)
@@ -91,6 +93,8 @@ Cmdtab proccmd[] = {
 	CMstop,		"stop",		1,
 	CMwaitstop,	"waitstop",	1,
 	CMwired,	"wired",	2,
+	CMfair,	"fair",	1,
+	CMunfair,	"unfair",	1,
 };
 
 /* Segment type from portdat.h */
@@ -118,6 +122,8 @@ Segment* txt2data(Proc*, Segment*);
 int	procstopped(void*);
 void	mntscan(Mntwalk*, Proc*);
 
+extern int unfair;
+
 static int
 procgen(Chan *c, char *name, Dirtab *tab, int, int s, Dir *dp)
 {
@@ -1088,7 +1094,7 @@ void
 procctlreq(Proc *p, char *va, int n)
 {
 	Segment *s;
-	int i, npc;
+	int npc, pri;
 	Cmdbuf *cb;
 	Cmdtab *ct;
 
@@ -1110,17 +1116,6 @@ procctlreq(Proc *p, char *va, int n)
 	case CMclosefiles:
 		procctlclosefiles(p, 1, 0);
 		break;
-	case CMfixedpri:
-		i = atoi(cb->f[1]);
-		if(i < 0)
-			i = 0;
-		if(i >= Nrq)
-			i = Nrq - 1;
-		if(i > p->basepri && !iseve())
-			error(Eperm);
-		p->basepri = i;
-		p->fixedpri = 1;
-		break;
 	case CMhang:
 		p->hang = 1;
 		break;
@@ -1146,15 +1141,15 @@ procctlreq(Proc *p, char *va, int n)
 		p->noswap = 1;
 		break;
 	case CMpri:
-		i = atoi(cb->f[1]);
-		if(i < 0)
-			i = 0;
-		if(i >= Nrq)
-			i = Nrq - 1;
-		if(i > p->basepri && !iseve())
+		pri = atoi(cb->f[1]);
+		if(pri > PriNormal && !iseve())
+			error(Eperm);
+		procpriority(p, pri, 0);
+		break;
+	case CMfixedpri:
+		if(!iseve())
 			error(Eperm);
-		p->basepri = i;
-		p->fixedpri = 0;
+		procpriority(p, atoi(cb->f[1]), 1);
 		break;
 	case CMprivate:
 		p->privatemem = 1;

+ 7 - 8
sys/src/9/port/devtls.c

@@ -730,7 +730,7 @@ tlsrecread(TlsRec *tr)
 	Block *volatile b;
 	uchar *p, seq[8], header[RecHdrLen], hmac[MD5dlen];
 	int volatile nconsumed;
-	int len, type, ver;
+	int len, type, ver, unpad_len;
 
 	nconsumed = 0;
 	if(waserror()){
@@ -791,19 +791,18 @@ tlsrecread(TlsRec *tr)
 	qlock(&in->seclock);
 	p = b->rp;
 	if(in->sec != nil) {
-		len = (*in->sec->dec)(in->sec, p, len);
-		if(len < 0)
-			rcvError(tr, EDecodeError, "incorrectly encrypted message");
-		if(len <= in->sec->maclen)
-			rcvError(tr, EDecodeError, "record message too short for mac");
-		len -= in->sec->maclen;
+		/* to avoid Canvel-Hiltgen-Vaudenay-Vuagnoux attack, all errors here
+		        should look alike, including timing of the response. */
+		unpad_len = (*in->sec->dec)(in->sec, p, len);
+		if(unpad_len > in->sec->maclen)
+			len = unpad_len - in->sec->maclen;
 
 		/* update length */
 		put16(header+3, len);
 		put64(seq, in->seq);
 		in->seq++;
 		(*tr->packMac)(in->sec, in->sec->mackey, seq, header, p, len, hmac);
-		if(memcmp(hmac, p+len, in->sec->maclen) != 0)
+		if(unpad_len <= in->sec->maclen || memcmp(hmac, p+len, in->sec->maclen) != 0)
 			rcvError(tr, EBadRecordMac, "record mac mismatch");
 		b->wp = b->rp + len;
 	}

+ 3 - 7
sys/src/9/port/portclock.c

@@ -124,17 +124,13 @@ hzclock(Ureg *ur)
 	if(up == 0 || up->state != Running)
 		return;
 
-	/* i.e. don't deschedule an EDF process here! */
-	if(anyready() && !edf->isedf(up)){
-		sched();
-		splhi();
-	}
-
 	/* user profiling clock */
-	if(userureg(ur)) {
+	if(userureg(ur)){
 		(*(ulong*)(USTKTOP-BY2WD)) += TK2MS(1);
 		segclock(ur->pc);
 	}
+
+	hzsched();	/* in proc.c */
 }
 
 void

+ 2 - 3
sys/src/9/port/portdat.h

@@ -657,10 +657,9 @@ struct Proc
 	ulong	priority;	/* priority level */
 	ulong	basepri;	/* base priority level */
 	uchar	fixedpri;	/* priority level deson't change */
-	ulong	rt;		/* # ticks used since last blocked */
-	ulong	art;		/* avg # ticks used since last blocked */
+	int	quanta;		/* quanta left */
+	ulong	readytime;	/* time process came ready */
 	ulong	movetime;	/* last time process switched processors */
-	ulong	readytime;	/* time process went ready */
 	int	preempted;	/* true if this process hasn't finished the interrupt
 				 *  that last preempted it
 				 */

+ 3 - 0
sys/src/9/port/portfns.h

@@ -119,6 +119,7 @@ char*		getconfenv(void);
 int		haswaitq(void*);
 long		hostdomainwrite(char*, int);
 long		hostownerwrite(char*, int);
+void		hzsched(void);
 void		iallocinit(void);
 Block*		iallocb(int);
 void		iallocsummary(void);
@@ -204,6 +205,7 @@ void		panic(char*, ...);
 Cmdbuf*		parsecmd(char *a, int n);
 ulong		perfticks(void);
 void		pexit(char*, int);
+int		preempted(void);
 void		printinit(void);
 int		procindex(ulong);
 void		pgrpcpy(Pgrp*, Pgrp*);
@@ -222,6 +224,7 @@ void		procdump(void);
 int		procfdprint(Chan*, int, int, char*, int);
 void		procinit0(void);
 void		procflushseg(Segment*);
+void		procpriority(Proc*, int, int);
 Proc*		proctab(int);
 void		procwired(Proc*, int);
 Pte*		ptealloc(void);

+ 139 - 91
sys/src/9/port/proc.c

@@ -20,7 +20,22 @@ static struct Procalloc
 	Proc*	free;
 } procalloc;
 
+enum
+{
+	Q=(HZ/20)*4,
+	DQ=((HZ-Q)/40)*2,
+};
+
 static Schedq	runq[Nrq];
+static ulong	runvec;
+static int	quanta[Nrq] =
+{
+	Q+19*DQ, Q+18*DQ, Q+17*DQ, Q+16*DQ,
+	Q+15*DQ, Q+14*DQ, Q+13*DQ, Q+12*DQ,
+	Q+11*DQ, Q+10*DQ, Q+ 9*DQ, Q+ 8*DQ,
+	Q+ 7*DQ, Q+ 6*DQ, Q+ 5*DQ, Q+ 4*DQ,
+	Q+ 3*DQ, Q+ 2*DQ, Q+ 1*DQ, Q+ 0*DQ,
+};
 
 extern Edfinterface	nulledf;
 
@@ -128,29 +143,69 @@ sched(void)
 int
 anyready(void)
 {
-	return nrdy || edf->edfanyready();
+	return runvec || edf->edfanyready();
 }
 
 int
 anyhigher(void)
 {
-	Schedq *rq;
+	return runvec & ~((1<<(up->priority+1))-1);
+}
 
-	if(nrdy == 0)
-		return 0;
+/*
+ *  here once per clock tick to see if we should resched
+ */
+void
+hzsched(void)
+{
+	/* another cycle, another quantum */
+	up->quanta--;
 
-	for(rq = &runq[Nrq-1]; rq > &runq[up->priority]; rq--)
-		if(rq->head != nil)
-			return 1;
+	/* edf scheduler always gets first chance */
+	if(edf->isedf(up))
+		return;
 
-	return 0;
+	/* don't bother unless someone is elegible */
+	if(anyhigher() || (!up->fixedpri && anyready())){
+		sched();
+		splhi();
+	}
 }
 
-enum
+/*
+ *  here at the end of non-clock interrupts to see if we should preempt the
+ *  current process.  Returns 1 if preempted, 0 otherwise.
+ */
+int
+preempted(void)
 {
-	Squantum = 1,
-};
+	if(up && up->state == Running)
+	if(up->preempted == 0)
+	if(anyhigher())
+	if(!active.exiting){
+		up->preempted = 1;
+		sched();
+		splhi();
+		up->preempted = 0;
+		return 1;
+	}
+	return 0;
+}
 
+/*
+ *  ready(p) picks a new priority for a process and sticks it in the
+ *  runq for that priority.
+ *
+ *  - fixed priority processes never move
+ *  - a process that uses all its quanta before blocking goes down a
+ *    priority level
+ *  - a process that uses less than half its quanta before blocking
+ *    goes up a priority level
+ *  - a process that blocks after using up half or more of it's quanta
+ *    stays at the same level
+ *
+ *  new quanta are assigned each time a process blocks or changes level
+ */
 void
 ready(Proc *p)
 {
@@ -164,34 +219,30 @@ ready(Proc *p)
 		splx(s);
 		return;
 	}
+
+	pri = p->priority;
+
 	if(p->fixedpri){
 		pri = p->basepri;
+		p->quanta = HZ;
+	} else if(p->state == Running){
+		if(p->quanta <= 0){
+			/* degrade priority of anyone that used their whole quanta */
+			if(pri > 0)
+				pri--;
+			p->quanta = quanta[pri];
+		}
 	} else {
-		/* history counts */
-		if(p->state == Running){
-			p->rt++;
-			pri = (p->art + p->rt)/2;
-		} else {
-			p->art = (p->art + p->rt + 2)/2;
-			pri = (p->art + p->rt)/2;
-			p->rt = 0;
+		if(p->quanta > quanta[pri]/2){
+			/* blocked before using half its quanta, go up */
+			if(++pri > p->basepri)
+				pri = p->basepri;
 		}
-		pri = p->basepri - (pri/Squantum);
-		if(pri < 0)
-			pri = 0;
-
-		/* the only intersection between the classes is at PriNormal */
-		if(pri < PriNormal && p->basepri > PriNormal)
-			pri = PriNormal;
-
-		/* stick at low priority any process waiting for a lock */
-		if(p->lockwait)
-			pri = PriLock;
+		p->quanta = quanta[pri];
 	}
 
+	rq = &runq[pri];
 	p->priority = pri;
-	rq = &runq[p->priority];
-
 	lock(runq);
 	p->rnext = 0;
 	if(rq->tail)
@@ -201,6 +252,7 @@ ready(Proc *p)
 	rq->tail = p;
 	rq->n++;
 	nrdy++;
+	runvec |= 1<<pri;
 	p->readytime = m->ticks;
 	p->state = Ready;
 	unlock(runq);
@@ -210,10 +262,10 @@ ready(Proc *p)
 Proc*
 runproc(void)
 {
-	Schedq *rq, *xrq;
-	Proc *p, *l;
-	ulong rt;
+	Schedq *rq;
+	Proc *p, *l, *tp;
 	ulong start, now;
+	int i;
 
 	start = perfticks();
 
@@ -221,55 +273,32 @@ runproc(void)
 		return p;
 
 loop:
-
 	/*
 	 *  find a process that last ran on this processor (affinity),
-	 *  or one that hasn't moved in a while (load balancing).
+	 *  or one that hasn't moved in a while (load balancing).  Every
+	 *  time around the loop affinity goes down.
 	 */
 	spllo();
-	for(;;){
-		if((++(m->fairness) & 0x3) == 0){
-			/*
-			 *  once in a while, run process that's been waiting longest
-			 *  regardless of movetime
-			 */
-			rt = 0xffffffff;
-			xrq = nil;
-			for(rq = runq; rq < &runq[Nrq]; rq++){
-				p = rq->head;
-				if(p == 0)
-					continue;
-				if(p->readytime < rt){
-					xrq = rq;
-					rt = p->readytime;
-				}
-			}
-			if(xrq != nil){
-				rq = xrq;
-				p = rq->head;
-				if(p != nil && p->wired == nil)
-					p->movetime = 0;
-				goto found;
-			}
-		} else {
-			/*
-			 *  get highest priority process that this
-			 *  processor can run given affinity constraints
-			 */
-			for(rq = &runq[Nrq-1]; rq >= runq; rq--){
-				p = rq->head;
-				if(p == 0)
-					continue;
-				for(; p; p = p->rnext){
-					if(p->mp == MACHP(m->machno)
-					|| p->movetime < MACHP(0)->ticks)
-						goto found;
-				}
+	for(i = 0;; i++){
+		/*
+		 *  find the highest priority target process that this
+		 *  processor can run given affinity constraints
+		 */
+		for(rq = &runq[Nrq-1]; rq >= runq; rq--){
+			tp = rq->head;
+			if(tp == 0)
+				continue;
+			for(; tp; tp = tp->rnext){
+				if(tp->mp == nil || tp->mp == MACHP(m->machno)
+				|| (!tp->wired && i > 0))
+					goto found;
 			}
 		}
 
-		/* remember how much time we're here */
+		/* waste time or halt the CPU */
 		idlehands();
+
+		/* remember how much time we're here */
 		now = perfticks();
 		m->perf.inidle += now-start;
 		start = now;
@@ -280,9 +309,13 @@ found:
 	if(!canlock(runq))
 		goto loop;
 
+	/*
+	 *  the queue may have changed before we locked runq,
+	 *  refind the target process.
+	 */
 	l = 0;
 	for(p = rq->head; p; p = p->rnext){
-		if(p->mp == MACHP(m->machno) || p->movetime <= MACHP(0)->ticks)
+		if(p == tp)
 			break;
 		l = p;
 	}
@@ -300,6 +333,8 @@ found:
 		l->rnext = p->rnext;
 	else
 		rq->head = p->rnext;
+	if(rq->head == nil)
+		runvec &= ~(1<<(rq-runq));
 	rq->n--;
 	nrdy--;
 	if(p->state != Ready)
@@ -307,8 +342,6 @@ found:
 	unlock(runq);
 
 	p->state = Scheding;
-	if(p->mp != MACHP(m->machno))
-		p->movetime = MACHP(0)->ticks + HZ/10;
 	p->mp = MACHP(m->machno);
 
 	return p;
@@ -366,20 +399,15 @@ newproc(void)
 	p->kp = 0;
 	p->procctl = 0;
 	p->notepending = 0;
-	p->mp = 0;
-	p->movetime = 0;
-	p->wired = 0;
 	p->ureg = 0;
 	p->privatemem = 0;
 	p->noswap = 0;
-	p->lockwait = nil;
 	p->errstr = p->errbuf0;
 	p->syserrstr = p->errbuf1;
 	p->errbuf0[0] = '\0';
 	p->errbuf1[0] = '\0';
 	p->nlocks = 0;
 	p->delaysched = 0;
-	p->movetime = 0;
 	kstrdup(&p->user, "*nouser");
 	kstrdup(&p->text, "*notext");
 	kstrdup(&p->args, "");
@@ -394,6 +422,11 @@ newproc(void)
 	if(p->kstack == 0)
 		p->kstack = smalloc(KSTACK);
 
+	/* sched params */
+	p->mp = 0;
+	p->wired = 0;
+	procpriority(p, PriNormal, 0);
+
 	p->task = nil;
 
 	return p;
@@ -430,10 +463,27 @@ procwired(Proc *p, int bm)
 	}
 
 	p->wired = MACHP(bm);
-	p->movetime = 0xffffffff;
 	p->mp = p->wired;
 }
 
+void
+procpriority(Proc *p, int pri, int fixed)
+{
+	if(pri >= Nrq)
+		pri = Nrq - 1;
+	else if(pri < 0)
+		pri = 0;
+	p->basepri = pri;
+	p->priority = pri;
+	if(fixed){
+		p->quanta = 0xfffff;
+		p->fixedpri = 1;
+	} else {
+		p->quanta = quanta[pri];
+		p->fixedpri = 0;
+	}
+}
+
 void
 procinit0(void)		/* bad planning - clashes with devproc.c */
 {
@@ -967,9 +1017,9 @@ dumpaproc(Proc *p)
 	s = p->psstate;
 	if(s == 0)
 		s = statename[p->state];
-	print("%3lud:%10s pc %8lux dbgpc %8lux  %8s (%s) ut %ld st %ld bss %lux qpc %lux nl %lud nd %lud lpc %lux\n",
+	print("%3lud:%10s pc %8lux dbgpc %8lux  %8s (%s) ut %ld st %ld bss %lux qpc %lux nl %lud nd %lud lpc %lux pri %lud\n",
 		p->pid, p->text, p->pc, dbgpc(p),  s, statename[p->state],
-		p->time[0], p->time[1], bss, p->qpc, p->nlocks, p->delaysched, p->lastlock ? p->lastlock->pc : 0);
+		p->time[0], p->time[1], bss, p->qpc, p->nlocks, p->delaysched, p->lastlock ? p->lastlock->pc : 0, p->priority);
 }
 
 void
@@ -1047,8 +1097,7 @@ scheddump(void)
 			continue;
 		print("rq%ld:", rq-runq);
 		for(p = rq->head; p; p = p->rnext)
-			print(" %lud(%lud, %lud)", p->pid, m->ticks - p->readytime,
-				MACHP(0)->ticks - p->movetime);
+			print(" %lud(%lud)", p->pid, m->ticks - p->readytime);
 		print("\n");
 		delay(150);
 	}
@@ -1083,8 +1132,7 @@ kproc(char *name, void (*func)(void *), void *arg)
 	p->ureg = 0;
 	p->dbgreg = 0;
 
-	p->basepri = PriKproc;
-	p->priority = p->basepri;
+	procpriority(p, PriKproc, 0);
 
 	kprocchild(p, func, arg);
 

+ 6 - 2
sys/src/9/port/qio.c

@@ -225,8 +225,12 @@ pullupblock(Block *bp, int n)
 			nbp->rp += n;
 			QDEBUG checkb(bp, "pullupblock 1");
 			return bp;
-		}
-		else {
+		} else {
+			/* shouldn't happen but why crash if it does */
+			if(i < 0){
+				print("pullup negative length packet\n");
+				i = 0;
+			}
 			memmove(bp->wp, nbp->rp, i);
 			pullupblockcnt++;
 			bp->wp += i;

+ 1 - 1
sys/src/cmd/postscript/p9bitpost/p9bitpost.c

@@ -74,7 +74,7 @@ main(int argc, char *argv[]) {
 			break;
 		default:
 		Usage:
-			fprint(2, "usage: %s [-b dpi] [-m magnification] [-L] [-P postscript_patch_string] [-p paperwidth paperlength (in inches)] inputfile\n", argv[0]);
+			fprint(2, "usage: %s [-b dpi] [-m magnification] [-L] [-P postscript_patch_string] [-p paperlength paperwidth (in inches)] inputfile\n", argv[0]);
 			exits("usage");
 		}
 	}

+ 286 - 0
sys/src/cmd/unix/winplumb.c

@@ -0,0 +1,286 @@
+#include <windows.h>
+#include <stdio.h>
+
+#pragma comment(lib, "wsock32.lib")
+#pragma comment(lib, "shell32.lib")
+
+char	*argv0 = "winplumb";
+char errbuf[256];
+unsigned long parseip(char*, char*);
+typedef unsigned long ulong;
+void oserror(void);
+
+void
+hnputl(void *p, unsigned long v)
+{
+	unsigned char *a;
+
+	a = p;
+	a[0] = v>>24;
+	a[1] = v>>16;
+	a[2] = v>>8;
+	a[3] = v;
+}
+
+void
+hnputs(void *p, unsigned short v)
+{
+	unsigned char *a;
+
+	a = p;
+	a[0] = v>>8;
+	a[1] = v;
+}
+
+unsigned long
+nhgetl(void *p)
+{
+	unsigned char *a;
+	a = p;
+	return (a[0]<<24)|(a[1]<<16)|(a[2]<<8)|(a[3]<<0);
+}
+
+unsigned short
+nhgets(void *p)
+{
+	unsigned char *a;
+	a = p;
+	return (a[0]<<8)|(a[1]<<0);
+}
+
+
+int
+main(int argc, char **argv)
+{
+	char *addr, *p, *q, to[4];
+	char buf[2048];
+	int port, fd, nfd, one, len, n, tot;
+	ulong ip;
+	struct sockaddr_in sin;
+	WSADATA wasdat;
+
+	if(argc != 1 && argc != 2){
+	usage:
+		fprintf(stderr, "usage: winplumb [tcp!ipaddr!port]\n");
+		ExitThread(1);
+	}
+
+	if(argc == 1)
+		addr = "tcp!*!17890";
+	else
+		addr = argv[1];
+
+	strcpy(buf, addr);
+	p = strchr(buf, '!');
+	if(p == 0)
+		goto usage;
+	q = strchr(p+1, '!');
+	if(q == 0)
+		goto usage;
+	*p++ = 0;
+	*q++ = 0;
+
+	if(strcmp(buf, "tcp") != 0)
+		goto usage;
+
+	port = atoi(q);
+	if(strcmp(p, "*") == 0)
+		ip = 0;
+	else
+		ip = parseip(to, p);
+
+	WSAStartup(MAKEWORD(1, 1), &wasdat);
+
+
+	fd = socket(AF_INET, SOCK_STREAM, 0);
+	if(fd < 0){
+		oserror();
+		fprintf(stderr, "socket: %s\n", errbuf);
+		ExitThread(1);
+	}
+
+	one = 1;
+	if(setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char*)&one, sizeof one) != 0){
+		oserror();
+		fprintf(stderr, "setsockopt nodelay: %s\n", errbuf);
+	}
+
+	if(setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char*)&one, sizeof one) != 0){
+		oserror();
+		fprintf(stderr, "setsockopt reuse: %s\n", errbuf);
+	}
+	memset(&sin, 0, sizeof sin);
+	sin.sin_family = AF_INET;
+	hnputs(&sin.sin_port, port);
+	hnputl(&sin.sin_addr, ip);
+	if(bind(fd, (struct sockaddr*)&sin, sizeof sin) < 0){
+		oserror();
+		fprintf(stderr, "bind: %s\n", errbuf);
+		ExitThread(1);
+	}
+
+	if(listen(fd, 5) < 0){
+		oserror();
+		fprintf(stderr, "listen: %s\n", errbuf);
+		ExitThread(1);
+	}
+
+	for(;;){
+		len = sizeof sin;
+		nfd = accept(fd, (struct sockaddr*)&sin, &len);
+		if(nfd < 0){
+			oserror();
+			fprintf(stderr, "accept: %s\n", errbuf);
+			continue;
+		}
+		tot = 0;
+		while(tot == 0 || buf[tot-1] != '\n'){
+			n = recv(nfd, buf+tot, sizeof buf-tot, 0);
+			if(n < 0)
+				break;
+			tot += n;
+		}
+		if(buf[tot-1] == '\n'){
+			buf[tot-1] = 0;
+			p = strchr(buf, ' ');
+			if(p)
+				*p++ = 0;
+			ShellExecute(0, 0, buf, p, 0, SW_SHOWNORMAL);
+		}
+		closesocket(nfd);
+	}
+}
+
+
+#define CLASS(p) ((*(unsigned char*)(p))>>6)
+
+
+unsigned long
+parseip(char *to, char *from)
+{
+	int i;
+	char *p;
+
+	p = from;
+	memset(to, 0, 4);
+	for(i = 0; i < 4 && *p; i++){
+		to[i] = strtoul(p, &p, 0);
+		if(*p == '.')
+			p++;
+	}
+	switch(CLASS(to)){
+	case 0:	/* class A - 1 byte net */
+	case 1:
+		if(i == 3){
+			to[3] = to[2];
+			to[2] = to[1];
+			to[1] = 0;
+		} else if (i == 2){
+			to[3] = to[1];
+			to[1] = 0;
+		}
+		break;
+	case 2:	/* class B - 2 byte net */
+		if(i == 3){
+			to[3] = to[2];
+			to[2] = 0;
+		}
+		break;
+	}
+	return nhgetl(to);
+}
+
+void
+oserror(void)
+{
+	int e, r, i;
+	char buf[200];
+
+	e = GetLastError();
+	
+	r = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
+		0, e, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+		buf, sizeof(buf), 0);
+
+	if(r == 0)
+		sprintf(buf, "windows error %d", e);
+
+
+	for(i = strlen(buf)-1; i>=0 && buf[i] == '\n' || buf[i] == '\r'; i--)
+		buf[i] = 0;
+
+	strcpy(errbuf, buf);
+}
+
+extern int	main(int, char*[]);
+static int	args(char *argv[], int n, char *p);
+
+int PASCAL
+WinMain(HANDLE hInst, HANDLE hPrev, LPSTR arg, int nshow)
+{
+	int argc, n;
+	char *p, **argv;
+
+	/* conservative guess at the number of args */
+	for(argc=5,p=arg; *p; p++)
+		if(*p == ' ' || *p == '\t')
+			argc++;
+
+	argv = malloc(argc*sizeof(char*));
+	argc = args(argv+1, argc, arg);
+	argc++;
+	argv[0] = argv0;
+	main(argc, argv);
+	ExitThread(0);
+	return 0;
+}
+
+/*
+ * Break the command line into arguments
+ * The rules for this are not documented but appear to be the following
+ * according to the source for the microsoft C library.
+ * Words are seperated by space or tab
+ * Words containing a space or tab can be quoted using "
+ * 2N backslashes + " ==> N backslashes and end quote
+ * 2N+1 backslashes + " ==> N backslashes + literal "
+ * N backslashes not followed by " ==> N backslashes
+ */
+static int
+args(char *argv[], int n, char *p)
+{
+	char *p2;
+	int i, j, quote, nbs;
+
+	for(i=0; *p && i<n-1; i++) {
+		while(*p == ' ' || *p == '\t')
+			p++;
+		quote = 0;
+		argv[i] = p2 = p;
+		for(;*p; p++) {
+			if(!quote && (*p == ' ' || *p == '\t'))
+				break;
+			for(nbs=0; *p == '\\'; p++,nbs++)
+				;
+			if(*p == '"') {
+				for(j=0; j<(nbs>>1); j++)
+					*p2++ = '\\';
+				if(nbs&1)
+					*p2++ = *p;
+				else
+					quote = !quote;
+			} else {
+				for(j=0; j<nbs; j++)
+					*p2++ = '\\';
+				*p2++ = *p;
+			}
+		}
+		/* move p up one to avoid pointing to null at end of p2 */
+		if(*p)
+			p++;
+		*p2 = 0;	
+	}
+	argv[i] = 0;
+
+	return i;
+}
+

BIN
sys/src/cmd/unix/winplumb.exe


+ 3 - 0
sys/src/cmd/unix/winstart

@@ -0,0 +1,3 @@
+#!/bin/rc
+
+echo $* | aux/trampoline tcp!192.168.233.1!17890