xref: /haiku/headers/private/kernel/int.h (revision d3d8b26997fac34a84981e6d2b649521de2cc45a)
1 /*
2  * Copyright 2003-2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
6  * Distributed under the terms of the NewOS License.
7  */
8 #ifndef _KERNEL_INT_H
9 #define _KERNEL_INT_H
10 
11 
12 #include <KernelExport.h>
13 #include <arch/int.h>
14 
15 struct kernel_args;
16 
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 status_t int_init(struct kernel_args *args);
23 status_t int_init_post_vm(struct kernel_args *args);
24 status_t int_init_post_device_manager(struct kernel_args *args);
25 int int_io_interrupt_handler(int vector, bool levelTriggered);
26 
27 bool interrupts_enabled(void);
28 
29 static inline void
30 enable_interrupts(void)
31 {
32 	arch_int_enable_interrupts();
33 }
34 
35 static inline bool
36 are_interrupts_enabled(void)
37 {
38 	return arch_int_are_interrupts_enabled();
39 }
40 
41 #ifdef __cplusplus
42 }
43 #endif
44 
45 #endif /* _KERNEL_INT_H */
46