… | |
… | |
765 | unless ($CLK & 0xf) { |
765 | unless ($CLK & 0xf) { |
766 | # do I/O |
766 | # do I/O |
767 | |
767 | |
768 | unless ($CLK & 0xfff) { |
768 | unless ($CLK & 0xfff) { |
769 | if (select $x = $RIN, undef, undef, $POWERSAVE < 100 ? 0 : 0.2) { |
769 | if (select $x = $RIN, undef, undef, $POWERSAVE < 100 ? 0 : 0.2) { |
|
|
770 | |
770 | # pty/serial I/O |
771 | # pty/serial I/O |
771 | if ($PTY && (vec $x, fileno $PTY, 1) && (@PUSARTRECV < 128) && !@KQUEUE) { |
772 | if ($PTY && (vec $x, fileno $PTY, 1) && (@PUSARTRECV < 128) && !@KQUEUE) { |
772 | sysread $PTY, my $buf, 256; |
773 | sysread $PTY, my $buf, 256; |
773 | |
774 | |
774 | # linux don't do cs7 and/or parity anymore, so we need to filter |
775 | # linux don't do cs7 and/or parity anymore, so we need to filter |
… | |
… | |
787 | |
788 | |
788 | stdin_parse if length $STDIN_BUF; |
789 | stdin_parse if length $STDIN_BUF; |
789 | } |
790 | } |
790 | |
791 | |
791 | $POWERSAVE = 0; # activity |
792 | $POWERSAVE = 0; # activity |
|
|
793 | } elsif (@PUSARTRECV || @KQUEUE) { |
|
|
794 | $POWERSAVE = 0; |
792 | } else { |
795 | } else { |
793 | ++$POWERSAVE unless @PUSARTRECV || @KQUEUE; |
796 | ++$POWERSAVE; |
794 | } |
797 | } |
795 | } |
798 | } |
796 | |
799 | |
797 | # kick off serial input interrupt quite often |
800 | # kick off serial input interrupt quite often |
798 | $RST |= 2 if @PUSARTRECV && $XON; # VT100, but works on vt102, too (probably not used on real hardware though) |
801 | $RST |= 2 if @PUSARTRECV && $XON; # VT100, but works on vt102, too (probably not used on real hardware though) |