Tuesday, December 02, 2008

some gcc extensions in the linux kernel

Here are some gcc extensions syntax in the linux kernel.
1. typeof(VARIABLE): You can find this at list_head related macros
2.range extension
3.zero-length arrays. IEEE 1394.
4. __builtin_expect. Layer II entry point use likely() and unlikely()
5.__builtin_prefetch. You can find this at list_head related macros

More details, visit IBM developer works
FYI:
IBM GCC hacks in the linux kernel