Hi,
I was looking at the panic() code in linux kernel which is defined as:
51 /**
52 * panic - halt the system
53 * @fmt: The text string to print
54 *
55 * Display a message, then perform cleanups.
56 *
57 * This function never returns.
58 */
59
60 NORET_TYPE void panic(const char * fmt, ...)
where, NORET_TYPE is declared as
/*
753 * Ok, these declarations are also in <linux/kernel.h> but none of the
754 * ext3 source programs needs to include it so they are duplicated here.
755 */
# define NORET_TYPE /**/ <====
Please help me in understanding a #defined variable(NORET_TYPE here) which is not defined to anything.
I know that panic() function was designed in this way to not to return
anything{in case of panic,there won't be anyone to catch the return
value from panic() },but how does this work.
i think a program in user land having a #defined variable which is left
blank will throw compile time error.how this is implemented in linux
kernel ?
I don't know much about C,hence please excuse me if this is a stupid querry .
~amit