Lines Matching defs:mask
86 uint8_t imr; /**< interrupt mask register */
168 int mask = 1 << irq;
169 if (pPic->elcr & mask)
174 Log2(("pic_set_irq1(ls) irr=%d irrnew=%d\n", pPic->irr, pPic->irr | mask));
175 pPic->irr |= mask;
176 pPic->last_irr |= mask;
180 Log2(("pic_set_irq1(lc) irr=%d irrnew=%d\n", pPic->irr, pPic->irr & ~mask));
181 pPic->irr &= ~mask;
182 pPic->last_irr &= ~mask;
190 if ((pPic->last_irr & mask) == 0)
192 Log2(("pic_set_irq1 irr=%x last_irr=%x\n", pPic->irr | mask, pPic->last_irr));
193 pPic->irr |= mask;
195 pPic->last_irr |= mask;
199 pPic->irr &= ~mask;
200 pPic->last_irr &= ~mask;
216 /* return the highest priority found in mask (highest = smallest
218 DECLINLINE(int) get_priority(PPICSTATE pPic, int mask)
221 if (mask == 0)
224 while ((mask & (1 << ((priority + pPic->priority_add) & 7))) == 0)
232 int mask, cur_priority, priority;
233 Log(("pic_get_irq%d: mask=%x\n", pPic->idxPic, pPic->irr & ~pPic->imr));
236 mask = pPic->irr & ~pPic->imr;
237 priority = get_priority(pPic, mask);
244 mask = pPic->isr;
246 mask &= ~(1 << 2);
247 cur_priority = get_priority(pPic, mask);