1 /* 2 * Copyright 2018, Haiku, Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Augustin Cavalier <waddlesplash> 7 */ 8 9 10 extern "C" { 11 # include <sys/kernel.h> 12 } 13 14 15 int 16 config_intrhook_establish(struct intr_config_hook *hook) 17 { 18 // By the time we get here, interrupts have already been set up, so 19 // unlike FreeBSD we do not need to store the hooks in a queue for later, 20 // but we can call them immediately. This is the same behavior that 21 // FreeBSD has as of 11.1 (however, they have a comment stating that 22 // it should probably not happen this way...) 23 (*hook->ich_func)(hook->ich_arg); 24 return 0; 25 } 26 27 28 void 29 config_intrhook_disestablish(struct intr_config_hook *hook) 30 { 31 // We don't store the hooks, so we don't need to do anything here. 32 } 33