1/*
2 * Copyright (c) 2011, ETH Zurich.
3 * All rights reserved.
4 *
5 * This file is distributed under the terms in the attached LICENSE file.
6 * If you do not find this file, copies can be found by writing to:
7 * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
8 */
9
10#ifndef _BARRELFISH_INTHANDLER_H
11#define _BARRELFISH_INTHANDLER_H
12
13#include <sys/cdefs.h>
14#include <barrelfish/caddr.h>
15#include <barrelfish/waitset.h>
16#include <errors/errno.h>
17
18__BEGIN_DECLS
19
20typedef void (*interrupt_handler_fn)(void *);
21
22
23errval_t inthandler_setup_movable_cap(struct capref dest_cap, interrupt_handler_fn handler, void *handler_arg,
24                                  interrupt_handler_fn reloc_handler,
25                                  void *reloc_handler_arg);
26
27errval_t inthandler_setup_movable(interrupt_handler_fn handler, void *handler_arg,
28                                  interrupt_handler_fn reloc_handler,
29                                  void *reloc_handler_arg,
30                                  uint64_t *ret_vector);
31errval_t inthandler_setup(interrupt_handler_fn handler, void *handler_arg,
32                          uint64_t *ret_vector);
33errval_t inthandler_setup_arm(interrupt_handler_fn handler, void *handler_arg,
34        uint32_t irq);
35
36errval_t alloc_dest_irq_cap(struct capref *retcap);
37
38extern struct waitset *barrelfish_interrupt_waitset;
39
40__END_DECLS
41
42#endif
43