Adding interrupt codes

This commit is contained in:
xj 2024-08-08 00:18:38 -07:00
parent 0e09b55903
commit cd35c4e733
1 changed files with 8 additions and 18 deletions

View File

@ -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_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);
int bind_xhci_intr(void *para){
@ -1068,5 +1050,13 @@ int bind_xhci_intr(void *para){
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;
}