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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
From 552d46db26f7c90b178eaa9be45bba8d72875d76 Mon Sep 17 00:00:00 2001
From: Justus Winter <justus@gnupg.org>
Date: Fri, 26 Feb 2016 13:27:28 +0100
Subject: [PATCH gnumach 6/9] Reorder
---
device/intr.c | 55 +++++++++++++++++++++++++++----------------------------
1 file changed, 27 insertions(+), 28 deletions(-)
diff --git a/device/intr.c b/device/intr.c
index 1e5a3ea..b0dcd83 100644
--- a/device/intr.c
+++ b/device/intr.c
@@ -10,8 +10,6 @@
#define sti() __asm__ __volatile__ ("sti": : :"memory")
#define cli() __asm__ __volatile__ ("cli": : :"memory")
-static boolean_t deliver_intr (int line, ipc_port_t dest_port);
-
struct intr_entry
{
queue_chain_t chain;
@@ -112,6 +110,33 @@ init_mach_intr_notification (mach_intr_notification_t *n)
t->msgt_unused = 0;
}
+static boolean_t
+deliver_intr (int line, ipc_port_t dest_port)
+{
+ ipc_kmsg_t kmsg;
+ mach_intr_notification_t *n;
+ mach_port_t dest = (mach_port_t) dest_port;
+
+ if (dest == MACH_PORT_NULL)
+ return FALSE;
+
+ kmsg = ikm_alloc(sizeof *n);
+ if (kmsg == IKM_NULL)
+ return FALSE;
+
+ ikm_init(kmsg, sizeof *n);
+ n = (mach_intr_notification_t *) &kmsg->ikm_header;
+ *n = mach_intr_notification_template;
+
+ n->intr_header.msgh_remote_port = dest;
+ n->line = line;
+
+ ipc_port_copy_send (dest_port);
+ ipc_mqueue_send_always(kmsg);
+
+ return TRUE;
+}
+
void
intr_thread ()
{
@@ -167,30 +192,4 @@ intr_thread ()
}
}
-static boolean_t
-deliver_intr (int line, ipc_port_t dest_port)
-{
- ipc_kmsg_t kmsg;
- mach_intr_notification_t *n;
- mach_port_t dest = (mach_port_t) dest_port;
-
- if (dest == MACH_PORT_NULL)
- return FALSE;
-
- kmsg = ikm_alloc(sizeof *n);
- if (kmsg == IKM_NULL)
- return FALSE;
-
- ikm_init(kmsg, sizeof *n);
- n = (mach_intr_notification_t *) &kmsg->ikm_header;
- *n = mach_intr_notification_template;
-
- n->intr_header.msgh_remote_port = dest;
- n->line = line;
-
- ipc_port_copy_send (dest_port);
- ipc_mqueue_send_always(kmsg);
-
- return TRUE;
-}
#endif /* MACH_XEN */
--
2.1.4
|