FreeBSD/sys/dev/vkbd/vkbd.c
/* Read one byte from the keyboard if it's allowed */
Read one byte from the keyboard if it's allowed
Read one byte from the keyboard if it ' s allowed
static int
vkbd_read(keyboard_t *kbd, int wait)
{
	vkbd_state_t	*state = (vkbd_state_t *) kbd->kb_data;
	int		 c;
	VKBD_LOCK(state);
	c = vkbd_data_read(state, wait);
	VKBD_UNLOCK(state);
	if (c != -1)
		kbd->kb_count ++;
	return (KBD_IS_ACTIVE(kbd)? c : -1);
}
static int vkbd_read ( keyboard_t * kbd , int wait ) { vkbd_state_t * state = ( vkbd_state_t * ) kbd -> kb_data ; int c ; VKBD_LOCK ( state ) ; c = vkbd_data_read ( state , wait ) ; VKBD_UNLOCK ( state ) ; if ( c != -1 ) kbd -> kb_count ++ ; return ( KBD_IS_ACTIVE ( kbd ) ? c : -1 ) ; }
Read one byte from the keyboard if it's allowed
Read one byte from the keyboard if it ' s allowed