Commit c2ffa8b
Introduce intr_state_t and MI "API" for blocking interrupts.
The fact that disabling/enabling real interrupts is totally MD makes
writing portable code harder, here I propose the following API:
enable_intr(void) Enables "all" hw interrupts.
disable_intr(void) Disables "all" hw interrupts.
intr_state_t state_intr(void) Reads hw interrupts state.
restore_intr(intr_state_t) Restore hw interrupts state.
I think this should map easily to arm or any other future platform,
intr_state_t should be defined to whatever is convenient to the arch.
Switch crit_rundeferred() to use it, when we port stuff to arm, we
just need to mimick the API.1 parent c2c7734 commit c2ffa8b
2 files changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| 193 | + | |
193 | 194 | | |
194 | 195 | | |
195 | 196 | | |
| |||
218 | 219 | | |
219 | 220 | | |
220 | 221 | | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
221 | 225 | | |
222 | 226 | | |
223 | 227 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
0 commit comments