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

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

Reply to
freegnu
Loading thread data ...

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

Reply to
Alain Mosnier

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.