Change to the interrupt handler return values.

Also, the style police have visited ps2mouse.c


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@338 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
David Reid
2002-07-19 16:02:58 +00:00
parent 5186a4c76b
commit fd2ee3a598
2 changed files with 14 additions and 14 deletions
@@ -158,7 +158,7 @@ static void insert_in_buf(char c)
static int handle_keyboard_interrupt(void* data) static int handle_keyboard_interrupt(void* data)
{ {
unsigned char key; unsigned char key;
int retval = INT_NO_RESCHEDULE; int retval = B_UNHANDLED_INTERRUPT;
key = in8(0x60); key = in8(0x60);
// dprintf("handle_keyboard_interrupt: key = 0x%x\n", key); // dprintf("handle_keyboard_interrupt: key = 0x%x\n", key);
@@ -220,7 +220,7 @@ static int handle_keyboard_interrupt(void* data)
// dprintf("ascii = 0x%x, '%c'\n", ascii, ascii); // dprintf("ascii = 0x%x, '%c'\n", ascii, ascii);
if(ascii != 0) { if(ascii != 0) {
insert_in_buf(ascii); insert_in_buf(ascii);
retval = INT_RESCHEDULE; retval = B_INVOKE_SCHEDULER;
} else { } else {
// dprintf("keyboard: unknown scan-code 0x%x\n",key); // dprintf("keyboard: unknown scan-code 0x%x\n",key);
} }
@@ -306,7 +306,7 @@ static int setup_keyboard(void)
status_t init_hardware() status_t init_hardware()
{ {
setup_keyboard(); setup_keyboard();
int_set_io_interrupt_handler(0x21,&handle_keyboard_interrupt, NULL); install_io_interrupt_handler(0x21, &handle_keyboard_interrupt, NULL, 0);
return 0; return 0;
} }
@@ -112,7 +112,7 @@ static int handle_mouse_interrupt(void* data)
} // switch } // switch
next_input = (next_input + 1) % 3; next_input = (next_input + 1) % 3;
return INT_NO_RESCHEDULE; return B_HANDLED_INTERRUPT;
} // handle_mouse_interrupt } // handle_mouse_interrupt
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
@@ -304,8 +304,8 @@ status_t init_hardware()
memset(&md_int, 0, sizeof(mouse_data)); memset(&md_int, 0, sizeof(mouse_data));
// register interrupt handler // register interrupt handler
int_set_io_interrupt_handler(INT_BASE + INT_PS2_MOUSE, install_io_interrupt_handler(INT_BASE + INT_PS2_MOUSE,
&handle_mouse_interrupt, NULL); &handle_mouse_interrupt, NULL, 0);
// must enable the cascade interrupt // must enable the cascade interrupt
arch_int_enable_io_interrupt(INT_BASE + INT_CASCADE); arch_int_enable_io_interrupt(INT_BASE + INT_CASCADE);
@@ -318,7 +318,7 @@ status_t init_hardware()
if(read_data_byte() != PS2_RES_ACK) { if(read_data_byte() != PS2_RES_ACK) {
dprintf("No PS/2 mouse found\n"); dprintf("No PS/2 mouse found\n");
return -1; return -1;
} // if }
dprintf("A PS/2 mouse has been successfully detected\n"); dprintf("A PS/2 mouse has been successfully detected\n");