-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinterrupt.h
65 lines (52 loc) · 1.04 KB
/
interrupt.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
* $Id: interrupt.h,v 1.2 1996/07/21 16:16:18 grubba Exp $
*
* Interrupt handling
*
* $Log: interrupt.h,v $
* Revision 1.1 1996/07/19 16:46:19 grubba
* Cleaned up interrupt handling.
* Cleaned up custom chip emulation.
* INTENA/INTREQ should work.
*
*
*/
#ifndef INTERRUPT_H
#define INTERRUPT_H
/*
* Includes
*/
#include <thread.h>
#include <synch.h>
#ifndef TYPES_H
#include "types.h"
#endif /* TYPES_H */
#ifndef M68K_H
#include "m68k.h"
#endif /* M68K_H */
/*
* Globals
*/
/*
* CPU Interrupts
*/
extern mutex_t cpu_irq_lock;
extern cond_t cpu_irq_signal;
extern U32 cpu_irq;
/*
* Interrupt Control
*/
extern mutex_t irq_ctrl_lock;
extern cond_t irq_ctrl_signal;
/*
* Prototypes
*/
/* Hardware interface */
void custom_write_intena(U32 reg, U16 val);
void custom_write_intreq(U32 reg, U16 val);
/* CPU interface */
U32 interrupt(struct m_registers *regs, U8 *mem, U32 nextpc, U32 mask);
U32 s_stop(struct m_registers *regs, U8 *mem, U32 nextpc);
/* Initialization */
void init_interrupt(void);
#endif /* INTERRUPT_H */