X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/7c38ad4ddde0e33cf3dee5f7cb6b869cb92adc43..419d8eabcd73b76f91ed59bb578fee0cb941f584:/usr/src/usr.bin/window/wwrint.c diff --git a/usr/src/usr.bin/window/wwrint.c b/usr/src/usr.bin/window/wwrint.c index d4c305fcc8..959a36a5a8 100644 --- a/usr/src/usr.bin/window/wwrint.c +++ b/usr/src/usr.bin/window/wwrint.c @@ -1,22 +1,31 @@ +/* + * Copyright (c) 1983 Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Edward Wang at The University of California, Berkeley. + * + * %sccs.include.redist.c% + */ + #ifndef lint -static char *sccsid = "@(#)wwrint.c 3.2 84/04/16"; -#endif +static char sccsid[] = "@(#)wwrint.c 3.11 (Berkeley) %G%"; +#endif /* not lint */ #include "ww.h" #include -#include /* * Tty input interrupt handler. * (1) Read input into buffer (wwib*). - * (2) If the flag wwsetjmp is true, do longjmp(wwjmpbuf) for asyncronous - * actions, and to avoid race conditions, clear wwsetjmp. + * (2) Set the interrupt flag if anything is read. * Currently, the last is used to get out of the blocking * select() in wwiomux(). * To avoid race conditions, we only modify wwibq in here, except * when the buffer is empty; and everywhere else, we only change wwibp. * It should be completely safe. */ +void wwrint() { register n; @@ -30,13 +39,9 @@ wwrint() if (n > 0) { wwibq += n; wwnreadc += n; + wwsetintr(); } else if (n == 0) wwnreadz++; else wwnreade++; - if (wwinterrupt() && wwsetjmp) { - wwsetjmp = 0; - (void) sigsetmask(sigblock(0) & ~sigmask(SIGIO)); - longjmp(wwjmpbuf, 1); - } }