tventi/wrarena: add timing output, fix sync - plan9port - [fork] Plan 9 from user space (HTM) git clone git://src.adamsgaard.dk/plan9port (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit d4bf606d29304006a85a35a8f09d38bf1529d2af (DIR) parent 304ab920ad0ac280b9a3e8efcd91f3552b8496d3 (HTM) Author: Russ Cox <rsc@swtch.com> Date: Thu, 3 Jul 2008 22:37:48 -0400 venti/wrarena: add timing output, fix sync Diffstat: M src/cmd/venti/srv/wrarena.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) --- (DIR) diff --git a/src/cmd/venti/srv/wrarena.c b/src/cmd/venti/srv/wrarena.c t@@ -173,7 +173,7 @@ threadmain(int argc, char *argv[]) file = argv[0]; } - fmtinstall('V', vtscorefmt); + ventifmtinstall(); statsinit(); t@@ -206,19 +206,21 @@ threadmain(int argc, char *argv[]) sysfatal("vtconnect: %r"); } + print("%T starting to send data\n"); c = chancreate(sizeof(ZClump), 0); for(i=0; i<12; i++) vtproc(vtsendthread, nil); rdarena(arena, offset); - if(vtsync(z) < 0) - sysfatal("executing sync: %r"); - memset(&zerocl, 0, sizeof zerocl); for(i=0; i<12; i++) send(c, &zerocl); + if(vtsync(z) < 0) + sysfatal("executing sync: %r"); if(z){ vthangup(z); } + print("%T sent all data\n"); + threadexitsall(0); }