hi all , when i read the softirq code, i cant understand the code:

Feb 27, 2007 1 Replies

hi all , when i read the softirq code, i cant understand the code:



static struct softirq_action softirq_vec[32] __cacheline_aligned_in_smp;



what dose __cacheline_aligned_in_smp mean? does it a macro?



thanks


Yes, it is a macro. It expands to some kind of __attribute__ "attribute" that is interpreted by GCC, and can for example be used to control alignment of variables in RAM (like, apparently, in this example).

If you really want to know what it expands to in the end, grep in in the kernel source and follow the track. If you want to know how GCC interprets it in the end, look for the final expansion in the GCC manual.

Regards,

Alain Mosnier

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required