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.

Comments »

The URI to TrackBack this entry is: http://gnurbs.blogsome.com/2007/10/17/lxr-to-the-rescue/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>


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