kbdmux.c (156226) | kbdmux.c (160768) |
---|---|
1/* 2 * kbdmux.c 3 */ 4 5/*- 6 * Copyright (c) 2005 Maksim Yevmenkin <m_evmenkin@yahoo.com> 7 * All rights reserved. 8 * --- 14 unchanged lines hidden (view full) --- 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 * 30 * $Id: kbdmux.c,v 1.4 2005/07/14 17:38:35 max Exp $ | 1/* 2 * kbdmux.c 3 */ 4 5/*- 6 * Copyright (c) 2005 Maksim Yevmenkin <m_evmenkin@yahoo.com> 7 * All rights reserved. 8 * --- 14 unchanged lines hidden (view full) --- 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 * 30 * $Id: kbdmux.c,v 1.4 2005/07/14 17:38:35 max Exp $ |
31 * $FreeBSD: head/sys/dev/kbdmux/kbdmux.c 156226 2006-03-03 00:46:28Z emax $ | 31 * $FreeBSD: head/sys/dev/kbdmux/kbdmux.c 160768 2006-07-27 20:33:48Z emax $ |
32 */ 33 34#include "opt_kbd.h" 35 36#include <sys/param.h> 37#include <sys/bus.h> 38#include <sys/conf.h> 39#include <sys/consio.h> --- 612 unchanged lines hidden (view full) --- 652 KBDMUX_UNLOCK(state); 653 654 return (action); 655 } 656 657 /* see if there is something in the keyboard queue */ 658 scancode = getc(&state->ks_inq); 659 if (scancode == -1) { | 32 */ 33 34#include "opt_kbd.h" 35 36#include <sys/param.h> 37#include <sys/bus.h> 38#include <sys/conf.h> 39#include <sys/consio.h> --- 612 unchanged lines hidden (view full) --- 652 KBDMUX_UNLOCK(state); 653 654 return (action); 655 } 656 657 /* see if there is something in the keyboard queue */ 658 scancode = getc(&state->ks_inq); 659 if (scancode == -1) { |
660 if (state->ks_flags & POLLING) { 661 kbdmux_kbd_t *k; 662 663 SLIST_FOREACH(k, &state->ks_kbds, next) { 664 while (KBDMUX_CHECK_CHAR(k->kbd)) { 665 scancode = KBDMUX_READ_CHAR(k->kbd, 0); 666 if (scancode == NOKEY) 667 break; 668 if (scancode == ERRKEY) 669 continue; 670 if (!KBD_IS_BUSY(k->kbd)) 671 continue; 672 673 putc(scancode, &state->ks_inq); 674 } 675 } 676 677 if (state->ks_inq.c_cc > 0) 678 goto next_code; 679 } 680 |
|
660 KBDMUX_UNLOCK(state); 661 return (NOKEY); 662 } 663 /* XXX FIXME: check for -1 if wait == 1! */ 664 665 kbd->kb_count ++; 666 667 /* return the byte as is for the K_RAW mode */ --- 671 unchanged lines hidden --- | 681 KBDMUX_UNLOCK(state); 682 return (NOKEY); 683 } 684 /* XXX FIXME: check for -1 if wait == 1! */ 685 686 kbd->kb_count ++; 687 688 /* return the byte as is for the K_RAW mode */ --- 671 unchanged lines hidden --- |