forked from xuos/xiuos
Adding interrupt codes
This commit is contained in:
parent
0e09b55903
commit
cd35c4e733
|
@ -1040,25 +1040,7 @@ int IPC_DO_SERVE_FUNC(Ipc_xhci_intr)(void* ignore)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
|
|
||||||
int IPC_DO_SERVE_FUNC(Ipc_wait_xhci_intr)(void* ignore)
|
|
||||||
{
|
|
||||||
// delay the this handle
|
|
||||||
#if 0
|
|
||||||
while (!has_one_interrupt) {
|
|
||||||
yield(SYS_TASK_YIELD_NO_REASON);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
// serve can be done by now
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
IPC_SERVER_INTERFACE(Ipc_xhci_intr, 1);
|
IPC_SERVER_INTERFACE(Ipc_xhci_intr, 1);
|
||||||
// IPC_SERVER_THREAD_INTERFACE(Ipc_wait_xhci_intr, 1);
|
|
||||||
// IPC_SERVER_REGISTER_INTERFACES(IpcXhciIntrHandler, 2, Ipc_xhci_intr, Ipc_wait_xhci_intr);
|
|
||||||
IPC_SERVER_REGISTER_INTERFACES(IpcXhciIntrHandler, 1, Ipc_xhci_intr);
|
IPC_SERVER_REGISTER_INTERFACES(IpcXhciIntrHandler, 1, Ipc_xhci_intr);
|
||||||
|
|
||||||
int bind_xhci_intr(void *para){
|
int bind_xhci_intr(void *para){
|
||||||
|
@ -1068,5 +1050,13 @@ int bind_xhci_intr(void *para){
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static char prog_name[] = "xhci0-intr-server";
|
||||||
|
if (register_server(prog_name) < 0) {
|
||||||
|
printf("register server name: %s failed.\n", prog_name);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
ipc_server_loop(&IpcXhciIntrHandler);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue