[BACK]Return to kern_irq.c CVS log [TXT][DIR] Up to [local] / funnyos / kern

Diff for /funnyos/kern/kern_irq.c between version 1.2 and 1.3

version 1.2, 2007/11/04 23:18:46 version 1.3, 2007/12/16 23:24:59
Line 21 
Line 21 
         /*          /*
          * Add interrupt vector to irqtable.           * Add interrupt vector to irqtable.
          */           */
         struct intr_vector *ivp;          struct intr_vector *ivp, *previvp;
   
         ivp = irqtable;          ivp = irqtable;
   
Line 43 
Line 43 
         }          }
         else {          else {
                 /* walk through the list */                  /* walk through the list */
                 do {                  while(ivp->iv_next != NULL) {
                         /* check if this interrupt line already binded */  
                         if (ivp->iv_intrno == intrno)                          if (ivp->iv_intrno == intrno)
                                 panic("failed to establish interrupt (intrno %d already set by other device)\n", intrno);                                  panic("failed to establish interrupt (intrno %d already set by other device)\n", intrno);
   
                         /* become next element */  
                         ivp = ivp->iv_next;                          ivp = ivp->iv_next;
                 } while(ivp != NULL);                  }
                   /* found last entry */
                   previvp = ivp;
                   ivp = ivp->iv_next;
   
                 /* allocate space */                  /* allocate space */
                 ivp = kmalloc(sizeof(struct intr_vector));                  ivp = kmalloc(sizeof(struct intr_vector));
Line 62 
Line 63 
                 ivp->iv_device = device;                  ivp->iv_device = device;
                 ivp->iv_intrfunc = intrfunc;                  ivp->iv_intrfunc = intrfunc;
                 ivp->iv_next = NULL;                  ivp->iv_next = NULL;
   
                   /* link previous entry */
                   previvp->iv_next = ivp;
         }          }
   
 }  }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

CVSweb