Rev 413 | Rev 1962 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 413 | Rev 432 | ||
---|---|---|---|
Line 136... | Line 136... | ||
136 | * Enable interrupts and return previous |
136 | * Enable interrupts and return previous |
137 | * value of EFLAGS. |
137 | * value of EFLAGS. |
138 | * |
138 | * |
139 | * @return Old interrupt priority level. |
139 | * @return Old interrupt priority level. |
140 | */ |
140 | */ |
141 | static inline ipl_t interrupts_enable(void) { |
141 | static inline ipl_t interrupts_enable(void) |
- | 142 | { |
|
142 | ipl_t v; |
143 | ipl_t v; |
143 | __asm__ volatile ( |
144 | __asm__ volatile ( |
144 | "pushf\n\t" |
145 | "pushf\n\t" |
145 | "popl %0\n\t" |
146 | "popl %0\n\t" |
146 | "sti\n" |
147 | "sti\n" |
Line 154... | Line 155... | ||
154 | * Disable interrupts and return previous |
155 | * Disable interrupts and return previous |
155 | * value of EFLAGS. |
156 | * value of EFLAGS. |
156 | * |
157 | * |
157 | * @return Old interrupt priority level. |
158 | * @return Old interrupt priority level. |
158 | */ |
159 | */ |
159 | static inline ipl_t interrupts_disable(void) { |
160 | static inline ipl_t interrupts_disable(void) |
- | 161 | { |
|
160 | ipl_t v; |
162 | ipl_t v; |
161 | __asm__ volatile ( |
163 | __asm__ volatile ( |
162 | "pushf\n\t" |
164 | "pushf\n\t" |
163 | "popl %0\n\t" |
165 | "popl %0\n\t" |
164 | "cli\n" |
166 | "cli\n" |
Line 171... | Line 173... | ||
171 | * |
173 | * |
172 | * Restore EFLAGS. |
174 | * Restore EFLAGS. |
173 | * |
175 | * |
174 | * @param ipl Saved interrupt priority level. |
176 | * @param ipl Saved interrupt priority level. |
175 | */ |
177 | */ |
176 | static inline void interrupts_restore(ipl_t ipl) { |
178 | static inline void interrupts_restore(ipl_t ipl) |
- | 179 | { |
|
177 | __asm__ volatile ( |
180 | __asm__ volatile ( |
178 | "pushl %0\n\t" |
181 | "pushl %0\n\t" |
179 | "popf\n" |
182 | "popf\n" |
180 | : : "r" (ipl) |
183 | : : "r" (ipl) |
181 | ); |
184 | ); |
Line 183... | Line 186... | ||
183 | 186 | ||
184 | /** Return interrupt priority level. |
187 | /** Return interrupt priority level. |
185 | * |
188 | * |
186 | * @return EFLAFS. |
189 | * @return EFLAFS. |
187 | */ |
190 | */ |
188 | static inline ipl_t interrupts_read(void) { |
191 | static inline ipl_t interrupts_read(void) |
- | 192 | { |
|
189 | ipl_t v; |
193 | ipl_t v; |
190 | __asm__ volatile ( |
194 | __asm__ volatile ( |
191 | "pushf\n\t" |
195 | "pushf\n\t" |
192 | "popl %0\n" |
196 | "popl %0\n" |
193 | : "=r" (v) |
197 | : "=r" (v) |