Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

At first I though this was just normal macros, not X-macros. But you're right, and at first I just wasn't understanding it. In linux/include/trace/stages/stage1_struct_define.h, linux/include/trace/stages/stage2_data_offsets.h, etc., we see the different definitions of __field and __array.

Also, in linux/include/linux/genl_magic_struct.h we see multiple different definitions of __field and __array, each followed by #include GENL_MAGIC_INCLUDE_FILE, and I had no idea you could even source the name of a file to #include from a preprocessor macro! But that's a different __array with a different number of arguments.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: