Revision 304
simplified interrupts
interrupts_func.c | ||
---|---|---|
198 | 198 |
void (mouse_manager)() { |
199 | 199 |
|
200 | 200 |
} |
201 |
|
|
202 |
int get_interrupts_vector(uint32_t *p){ |
|
203 |
int r; |
|
204 |
|
|
205 |
*p = 0; |
|
206 |
|
|
207 |
int ipc_status; |
|
208 |
message msg; |
|
209 |
if ((r = driver_receive(ANY, &msg, &ipc_status)) != 0) { |
|
210 |
printf("driver_receive failed with %d", r); |
|
211 |
return OTHER_ERROR; |
|
212 |
} |
|
213 |
if (is_ipc_notify(ipc_status)) { /* received notification */ |
|
214 |
switch (_ENDPOINT_P(msg.m_source)) { |
|
215 |
case HARDWARE: /* hardware interrupt notification */ |
|
216 |
*p = msg.m_notify.interrupts; |
|
217 |
return SUCCESS; |
|
218 |
default: break; /* no other notifications expected: do nothing */ |
|
219 |
} |
|
220 |
} |
|
221 |
return SUCCESS; |
|
222 |
} |
Also available in: Unified diff