4d6fb4444d2c69e533ae1e4741e23cfc67457c32
[lunaix-os.git] / lunaix-os / arch / x86 / includes / asm / x86_isrm.h
1 #ifndef __LUNAIX_X86_ISRM_H
2 #define __LUNAIX_X86_ISRM_H
3
4 #include <asm-generic/isrm.h>
5
6 /**
7  * @brief Bind given iv with it's associated handler
8  *
9  * @param iv
10  * @param handler
11  */
12 void
13 isrm_bindiv(int iv, isr_cb handler);
14
15 void
16 isrm_irq_attach(int irq, int iv, cpu_t dest, u32_t flags);
17
18 /**
19  * @brief Allocate an iv resource for os services
20  *
21  * @param iv
22  */
23 int
24 isrm_ivosalloc(isr_cb handler);
25
26 /**
27  * @brief Allocate an iv resource for external events
28  *
29  * @param iv
30  */
31 int
32 isrm_ivexalloc(isr_cb handler);
33
34 /**
35  * @brief Release a iv resource
36  *
37  * @param iv
38  */
39 void
40 isrm_ivfree(int iv);
41
42 /**
43  * @brief Get the handler associated with the given iv
44  *
45  * @param iv
46  * @return isr_cb
47  */
48 isr_cb
49 isrm_get(int iv);
50
51 ptr_t
52 isrm_get_payload(const struct hart_state*);
53
54 void
55 isrm_set_payload(int iv, ptr_t);
56
57
58 #endif /* __LUNAIX_X86_ISRM_H */