root / lab4 / .minix-src / include / ddekit / interrupt.h @ 13
History | View | Annotate | Download (1.83 KB)
1 | 13 | up20180614 | /*-
|
---|---|---|---|
2 | * Copyright (c) 2006 TU Dresden, All rights reserved.
|
||
3 | *
|
||
4 | * Redistribution and use in source and binary forms, with or without
|
||
5 | * modification, are permitted provided that the following conditions
|
||
6 | * are met:
|
||
7 | *
|
||
8 | * 1. Redistributions of source code must retain the above copyright
|
||
9 | * notice, this list of conditions and the following disclaimer.
|
||
10 | * 2. Redistributions in binary form must reproduce the above copyright
|
||
11 | * notice, this list of conditions and the following disclaimer in
|
||
12 | * the documentation and/or other materials provided with the
|
||
13 | * distribution.
|
||
14 | *
|
||
15 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||
16 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||
17 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||
18 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||
19 | * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||
20 | * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||
21 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||
23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||
24 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||
25 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||
26 | * SUCH DAMAGE.
|
||
27 | */
|
||
28 | |||
29 | #ifndef _DDEKIT_INTERUPT_H
|
||
30 | #define _DDEKIT_INTERUPT_H
|
||
31 | #include <ddekit/ddekit.h> |
||
32 | #include <ddekit/thread.h> |
||
33 | |||
34 | /** Attach to an interrupt */
|
||
35 | ddekit_thread_t *ddekit_interrupt_attach( int irq, int shared, |
||
36 | void(*thread_init)(void *), void(*handler)(void *), void *priv); |
||
37 | |||
38 | /* Detach from a previously attached interrupt. */
|
||
39 | void ddekit_interrupt_detach(int irq); |
||
40 | |||
41 | /* Block interrupt. */
|
||
42 | void ddekit_interrupt_disable(int irq); |
||
43 | |||
44 | /* Enable interrupt */
|
||
45 | void ddekit_interrupt_enable(int irq); |
||
46 | |||
47 | #endif |