views:

56

answers:

2

I noticed that in the Linux kernel 2.4 file sched.c there's a line that says:

void scheduling_functions_start_here(void) { }

and one that says

void scheduling_functions_end_here(void) { }

Shouldn't this kind of stuff be written as a comment? What is the gain of using functions?

+1  A: 

I'm not a Linux kernel author, but the most likely answer is that function names are more likely to appear in an IDE's file index than comments are.

Chuck
+5  A: 

Ok, I just did some googling, and can now somewhat back up my comment. Check out process.c, line 439 onwards.

I don't read C too well, but it looks like it needs to check whether a thread is in a scheduling function or not.

Blorgbeard