static void virtio_irq_unregister(struct virtio_device *dev) { int r; if ((r = sys_irqrmpolicy(&dev->irq_hook) != OK)) panic("%s: Unable to unregister IRQ %d", dev->name, r); }
int timer_unsubscribe_int() { if (OK == sys_irqdisable(&hook_id_timer)) if (OK == sys_irqrmpolicy(&hook_id_timer)) return 0; return -1; }
int kbd_unsubscribe_int() { if (OK == sys_irqdisable(&hook_id_keyboard)) if (OK == sys_irqrmpolicy(&hook_id_keyboard)) return 0; return -1; }
int mouse_unsubscribe_int() { if (OK == sys_irqdisable(&hook_id_mouse)) if (OK == sys_irqrmpolicy(&hook_id_mouse)) return 0; return -1; }
int sp2_unsubscribe_int() { if (sys_irqdisable(&hook_id_sp2) == OK) if (sys_irqrmpolicy(&hook_id_sp2) == OK) return 0; return -1; }
int timer_unsubscribe_int() { if (sys_irqrmpolicy(&irq_hook_id) == OK) { return 0; } return 1; }
int timer_unsubscribe() { if(sys_irqrmpolicy(&hookID_t) != OK || sys_irqdisable(&hookID_t) != OK){ return 1; } return 0; }
/*===========================================================================* * sef_cb_signal_handler * *===========================================================================*/ static void sef_cb_signal_handler(int signo) { /* In case of a termination signal, shut down this driver. * Stop the device, and deallocate resources as proof of concept. */ int r; /* Only check for termination signal, ignore anything else. */ if (signo != SIGTERM) return; atl2_stop(); if ((r = sys_irqrmpolicy(&state.hook_id)) != OK) panic("unable to deregister IRQ: %d", r); free_contig(state.txd_base, ATL2_TXD_BUFSIZE); free_contig(state.txs_base, ATL2_TXS_COUNT * sizeof(u32_t)); free_contig(state.rxd_base_u, state.rxd_align + ATL2_RXD_COUNT * ATL2_RXD_SIZE); vm_unmap_phys(SELF, (void *) state.base, state.size); /* We cannot free the PCI device at this time. */ exit(0); }
int timer_unsubscribe_int() { if (sys_irqrmpolicy(&hook_id) == OK && sys_irqdisable(&hook_id) == OK) return EXIT_SUCCESS; else return EXIT_FAILURE; }
int rtc_unsubscribe_int() { rtc_disable_interrupts(); if (OK == sys_irqdisable(&hook_id_rtc)) if (OK == sys_irqrmpolicy(&hook_id_rtc)) return 0; return -1; }
int kdb_unsubscribe_int() { if ((sys_irqrmpolicy(&hooke_id) != OK)) return 1; else if (sys_irqdisable(&hooke_id) != OK) return 1; else return 0; }
int KBD_unsubscribe_int() { if(sys_irqrmpolicy(&hook_id2) == OK) if (sys_irqdisable(&hook_id2) == OK) return 0; return 1; }
int kbd_unsubscribe_int() { if (sys_irqrmpolicy(&kbd_hook_id) == OK) { if (sys_irqdisable(&kbd_hook_id) == OK) { return 0; } } return 1; }
int kbd_unsubscribe_int() { if (sys_irqdisable(&kbd_hook) != 0) { return ERROR; } if (sys_irqrmpolicy(&kbd_hook) != 0) { return ERROR; } return 0; }
int mouse_unsubscribe_int() { unsigned long stat; sys_inb(IN_BUF,&stat); sys_irqrmpolicy(&mousehook); sys_irqdisable(&mousehook); return 1; }
////unsubscribe mouse interrupts int mouse_unsubscribe_int(void) { if(sys_irqdisable(&mouse_hook_id) != OK){ printf("mouse_unsubscribe_int(): sys_irqdisable() failed\n"); return 1; } if(sys_irqrmpolicy(&mouse_hook_id) != OK){ printf("mouse_unsubscribe_int(): sys_irqrmpolicy() failed\n"); return 1; } return 0; }
int timer_unsubscribe_int() { if(sys_irqdisable(&hook_id) != OK){ return 1; } if(sys_irqrmpolicy(&hook_id) != OK){ return 1; } return 0; }
int mouse_unsubscribe() { if (sys_irqdisable(&hook_id) != 0) { printf("\nMouse_unsubscribe failed \n"); return 1; } if (sys_irqrmpolicy(&hook_id) != 0) { printf("\nMouse_unsubscribe failed \n"); return 1; } return 0; }
int ser_unsubscribe_com2_int(void) { if(sys_irqdisable(&ser_com2_hook_id) != OK){ printf("ser_subscribe_com2_int(): sys_irqdisable() failed\n"); return 1; } if(sys_irqrmpolicy(&ser_com2_hook_id) != OK){ printf("ser_subscribe_com2_int(): sys_irqrmpolicy() failed\n"); return 1; } return 0; }
int timer_unsubscribe_int() { if(sys_irqdisable(&(timerInt.bit)) != OK){ printf("ERROR DISABLING SUBSCRIPTION!\n"); return 1; } if(sys_irqrmpolicy(&(timerInt.bit)) != OK){ return 1; } return 0; }
int keyboard_unsubscribe_int() { if(sys_irqdisable(&hook_id_kbd)!= OK) { printf("IRQDISABLE failed /n"); return -1; } if(sys_irqrmpolicy(&hook_id_kbd)!=OK) { printf("IRQRMPOLICY failed /n"); return -1; } return 0; }
int unsubscribeKeyboard() { if (sys_irqdisable(&kb_id) != OK) { printf("\tsubscribeKeyboard() in Keyboard.c: sys_irqdisable failed"); return 1; } if (sys_irqrmpolicy(&kb_id) != OK) { printf("\tsubscribeKeyboard() in Keyboard.c: sys_irqrmpolicy failed"); return 1; } return 0; }
int timer_unsubscribe_int() { /*sys_irqrmpolicy(int *hook_id) Unsubscribes a previous interrupt notification. sys_irqdisable(int *hook_id) Masks an interrupt line associated with a previously subscribed interrupt notification.*/ if (sys_irqdisable(&hook_id) != 0) { printf("\ntimer_unsubscribe_int() failed \n"); return 1; } if (sys_irqrmpolicy(&hook_id) != 0) { printf("\ntimer_unsubscribe_int() failed \n"); return 1; } return 0; }
PRIVATE void msg_sig_stop(void) { int i; char irq; for (i = 0; i < drv.NrOfSubDevices; i++) { drv_stop(i); /* stop all sub devices */ } if (irq_hook_set) { if (sys_irqdisable(&irq_hook_id) != OK) { error("Could not disable IRQ\n"); } /* get irq from device driver*/ if (drv_get_irq(&irq) != OK) { error("Msg SIG_STOP Couldn't get IRQ"); } /* remove the policy */ if (sys_irqrmpolicy(irq, &irq_hook_id) != OK) { error("%s: Could not disable IRQ\n",drv.DriverName); } } }
int unsubscribe_int(int *hook_id) { int status; status = sys_irqdisable(hook_id); if (status != OK) { printf("sys_irqdisable failed with: %d", status); return -1; } status = sys_irqrmpolicy(hook_id); if (status != OK) { printf("sys_irqrmpolicy failed with: %d", status); return -1; } return 0; }
int keyboard_unsubscribe_int() { int status; status = sys_irqdisable(&kb_id); if (status != OK) { printf("sys_irqdisable failed with: %d", status); return -1; } status = sys_irqrmpolicy(&kb_id); if (status != OK) { printf("sys_irqrmpolicy failed with: %d", status); return -1; } return 0; }
int kbd_unsubscribe_int() { if(sys_irqrmpolicy(&hook) == OK && sys_irqdisable(&hook)) return 0; return 1; }
int unsubscribe_mouse() { return sys_irqdisable(&hookID) != OK || sys_irqrmpolicy(&hookID) != OK; }
int kbd_unsubscribe_int() { int value = KBD_HOOK_ID; return (sys_irqrmpolicy(&value)||sys_irqdisable(&value)); }
int timer_unsubscribe_int() { if(sys_irqrmpolicy(&timer_hook) == OK && sys_irqdisable(&timer_hook)) return 0; return 1; }