示例#1
0
void
db_check_interrupt(void)
{
    int	c;

    c = cnmaygetc();
    switch (c) {
    case -1:		/* no character */
        return;

    case CTRL('c'):
        db_error(NULL);
    /*NOTREACHED*/

    case CTRL('s'):
        do {
            c = cnmaygetc();
            if (c == CTRL('c'))
                db_error(NULL);
        } while (c != CTRL('q'));
        break;

    default:
        /* drop on floor */
        break;
    }
}
示例#2
0
void
db_console(void)
{
			if (i_bit(CBUS_PUT_CHAR, my_word)) {
				volatile u_char c = cbus_ochar;
				i_bit_clear(CBUS_PUT_CHAR, my_word);
				cnputc(c);
			} else if (i_bit(CBUS_GET_CHAR, my_word)) {
				if (cbus_wait_char)
					cbus_ichar = cngetc();
				else
					cbus_ichar = cnmaygetc();
				i_bit_clear(CBUS_GET_CHAR, my_word);
#ifndef	notdef
			} else if (!cnmaygetc()) {
#else	/* notdef */
			} else if (com_is_char() && !com_getc(TRUE)) {
#endif	/* notdef */
				simple_unlock(&db_lock);
				db_cpu = my_cpu;
			}
}
示例#3
0
int
kdp_getc(void)
{
	return(cnmaygetc());
}
示例#4
0
文件: kdp_machdep.c 项目: Prajna/xnu
int
kdp_getc(void)
{
	return	cnmaygetc();
}