scw@cepu.UUCP (10/04/84)
*<eat that, bug> This is a REVISED patch to reinstall the cpu.speedup patch. It was pointed out to me by Rick Adams <ihnp4!seismo!rick> that: >If you had put the linebaud = inside fixline() you would have >only changed 2 lines outside of pk1.c >The way to so it is make the last line of fixline() > linebaud = spwant; >---rick This is a reinstallation of the cpu.speedup patch (from the news package) as applied to the 2.9BSD uucico. This patch will also fix the problem of very slow transfers that happen when using 2.9BSD uucico. SO, revert to the unpatched version of condevs.c and make the followig patch to conn.c. Two files are affected by this patch: conn.c and pk1.c. One of the patches to pk1.c must be applied in order to have uucico run at some reasonable rate. I'd like to thank Dr. Stan Sted (cepu!ucla-an!stan) and Kyle Henrickson (cepu!ucla-ci!kyle) for acting as Guinea Pigs in this manner (but then they got faster uucp Xfers out of it) Also Rick Adams <ihnp4!seismo!rick> for his comment. Sorry 'bout the overly verbose previous patch. <cepu!scw> ------------------------------cut here------------------------------------------ You must apply one or the other of these patches to pk1.c This is patch #1 a minimal patch to fix the slowness problem *** pk1.c.O Mon Oct 1 17:03:08 1984 --- pk1.c.B Wed Jul 20 17:00:06 1983 *************** *************** *** 370,379 alarm(0); return(-1); } PKASSERT(ret > 0, "PKCGET READ", "", ret); b += ret; } alarm(0); return(0); } --- 370,379 ----- alarm(0); return(-1); } PKASSERT(ret > 0, "PKCGET READ", "", ret); b += ret; - sleep(1); } alarm(0); return(0); } This SET of patches (to pk1.c and conn.c) will add the cpu.speedup feature to 2.9BSD uucico. *** pk1.c Mon Oct 1 17:06:10 1984 --- pk1.c.B Wed Jul 20 17:00:06 1983 *************** *** 354,364 int fn, n; register char *b; { register int nchars, ret; - extern int linebaud; /* CPU SPEED --- SWS 10/1/84 */ if (setjmp(Getjbuf)) { Ntimeout++; PKDEBUG(4, "alarm %d\n", Ntimeout); return(-1); } --- 354,363 ----- int fn, n; register char *b; { register int nchars, ret; if (setjmp(Getjbuf)) { Ntimeout++; PKDEBUG(4, "alarm %d\n", Ntimeout); return(-1); } *************** *** 363,373 return(-1); } signal(SIGALRM, cgalarm); alarm(PKTIME); ! for (nchars = 0; nchars < n; ) { /* SWS */ ret = read(fn, b, n - nchars); if (ret == 0) { alarm(0); return(-1); } --- 362,372 ----- return(-1); } signal(SIGALRM, cgalarm); alarm(PKTIME); ! for (nchars = 0; nchars < n; nchars += ret) { ret = read(fn, b, n - nchars); if (ret == 0) { alarm(0); return(-1); } *************** *** 371,382 alarm(0); return(-1); } PKASSERT(ret > 0, "PKCGET READ", "", ret); b += ret; - nchars += ret; /* SWS */ - if (( nchars < n) && (linebaud > 0) && (linebaud < 4800)) sleep(1); } alarm(0); return(0); } --- 370,379 ----- alarm(0); return(-1); } PKASSERT(ret > 0, "PKCGET READ", "", ret); b += ret; sleep(1); } alarm(0); return(0); } *** conn.c Sun Feb 19 13:36:50 1984 --- conn.c.new Thu Oct 4 07:45:30 1984 *************** *** 373,377 * return codes: none */ ! fixline(tty, spwant) int tty, spwant; --- 373,377 ----- * return codes: none */ ! int linebaud; fixline(tty, spwant) int tty, spwant; *************** *** 414,417 ioctl(tty, TIOCEXCL, STBNULL); #endif return; } --- 414,418 ----- ioctl(tty, TIOCEXCL, STBNULL); #endif + linebaud=spwant; return; } -- Stephen C. Woods (VA Wadsworth Med Ctr./UCLA Dept. of Neurology) uucp: { {ihnp4, uiucdcs}!bradley, hao, trwrb, sdcrdcf}!cepu!scw ARPA: cepu!scw@ucla-cs location: N 34 3' 9.1" W 118 27' 4.3"