Reputation: 72
`static noinline void __sched __down(struct semaphore *sem)`
In the above function, why is __sched
used before the __down
function of the semaphore code?
Upvotes: 1
Views: 594
Reputation: 6203
__sched
is a macro and not keyword, adding an attribute to the function, think of it as some added meta-information.
As defined in <linux/sched.h>
:
/* Attach to any functions which should be ignored in wchan output. */
#define __sched __attribute__((__section__(".sched.text")))
So adding the __sched
macro to a function results in supressing the wchan information for that function.
Upvotes: 3