Add interrupt processing functions

This commit is contained in:
xj 2024-08-09 04:54:40 -07:00
parent 91d06a23b3
commit 7003f26807
2 changed files with 14 additions and 3 deletions

View File

@ -1098,7 +1098,17 @@ int create_xhci_intr_service(void *para){
}
// tid = thread();
tid = thread(bind_xhci_intr, "xhci_intr_procedure", para);
/* Create thread error! */
if(tid < 0){
return -1;
}else if(tid > 0){
xhci->tid_intr = tid;
}else{
/* Child thread. do nothing except for the interrupt processing function. */
}
return 0;
}

View File

@ -818,8 +818,6 @@ struct xhci_slot {
unsigned int tt_id;
/** Transaction translator port */
unsigned int tt_port;
/** Thread ID of the thread that is created to process xhci interrupt */
unsigned int tid_intr;
/** Endpoints, indexed by context ID */
struct xhci_endpoint *endpoint[XHCI_CTX_END];
@ -922,6 +920,9 @@ struct xhci_host {
uintptr_t eseg_addr;
uintptr_t eseg_phy;
/* Thread ID of the thread that is created to process xhci interrupt */
unsigned int tid_intr;
struct xhci_endpoint *cur_cmd_pipe;
};