Documented GVF_SAVE_VAR alongside other flags, and removed a query/doubt
[AROS.git] / arch / m68k-mac / include / asm / irq.h
blob54777a19b14b23c27261e7462b65d8eda47620b1
1 #ifndef ASM_IRQ_H
2 #define ASM_IRQ_H
3 /*
4 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
5 $Id$
7 Desc: Interrupt core, part of kernel.resource
8 Lang: english
9 */
11 #include <exec/ptrace.h>
13 /*********************************************************************/
15 #define __STR(x) #x
16 #define STR(x) __STR(x)
18 /*********************************************************************/
20 #define NR_IRQS 16 /* Use all XT-PIC interrupts */
21 #define NR_SYSCALLS 4
24 * Structure used to describe interrupt controler. Sufficient to describe
25 * the low-level hardware
27 struct irqController
29 const char *ic_Name; /* Controller name */
30 void (*ic_startup)(unsigned int); /* All functions here! */
31 void (*ic_shutdown)(unsigned int);
32 void (*ic_handle)(unsigned int, unsigned int, struct pt_regs *);
33 void (*ic_enable)(unsigned int);
34 void (*ic_disable)(unsigned int);
37 struct irqServer
39 void (*is_handler)(int, void *, struct pt_regs *);
40 const char *is_name; /* Server name */
41 void *is_UserData; /* Will be class data or similar */
44 struct irqDescriptor
46 unsigned int id_status; /* IRQ status. See below for details */
47 struct irqController *id_handler; /* how to do emable/disable */
48 struct irqServer *id_server; /* Server pointer */
49 unsigned int id_depth; /* Disable depth for nested IRQs */
50 unsigned int id_count; /* IRQ counter */
51 unsigned int id_unused[3];
54 /* IRQ status */
56 #define IRQ_INPROGRESS 1 /* Handler active - DO NOT enter */
57 #define IRQ_DISABLED 2 /* IRQ disabled - DO NOT enter */
58 #define IRQ_PENDING 4 /* IRQ pending - replay on enable */
59 #define IRQ_REPLAY 8 /* IRQ has been replayed but not acked yet */
60 #define IRQ_AUTODETECT 16 /* IRQ is being autodetected */
61 #define IRQ_WAITING 32 /* IRQ not seen yet - for autodetection */
63 #endif /* ASM_IRQ_H */