in the name of zero

October 17, 2007

LXR to the rescue

Filed under: hermetic studies
register_percpu_irq (ia64_vector vec, struct irqaction *action)
{
         irq_desc_t *desc;
         unsigned int irq;
	
         for (irq = 0; irq < NR_IRQS; ++irq)
                 if (irq_to_vector(irq) == vec) {
                         desc = irq_desc + irq;
                         ...

notice the bold texts… a wild pointer at first glance… mainly the fault of _t part of the name… wow what colossal lameness on my part.

[ array index range initializer ]

struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned_in_smp = {
         [0 … NR_IRQS-1] = {
                 .status = IRQ_DISABLED,
                 /* snipped */
         }
};
more initializer goodness here.

in retrospect.. i’ve never seen linux code at the daily wtf. amazing. really.

Get free blog up and running in minutes with Blogsome | Theme designs available here