etc/services - sync with NetBSD-8
[minix.git] / minix / include / ddekit / interrupt.h
blobc0e5f9120f7e32890bbca0576c71be4588988a71
1 /*-
2 * Copyright (c) 2006 TU Dresden, All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
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.
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.
29 #ifndef _DDEKIT_INTERUPT_H
30 #define _DDEKIT_INTERUPT_H
31 #include <ddekit/ddekit.h>
32 #include <ddekit/thread.h>
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);
38 /* Detach from a previously attached interrupt. */
39 void ddekit_interrupt_detach(int irq);
41 /* Block interrupt. */
42 void ddekit_interrupt_disable(int irq);
44 /* Enable interrupt */
45 void ddekit_interrupt_enable(int irq);
47 #endif