Function declaration instead of comment

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

void scheduling_functions_start_here(void) { } 

and one that says

 void scheduling_functions_end_here(void) { } 

Shouldn't this material be written as a comment? What is the efficiency of using functions?

+4
source share
2 answers

Ok, I just did some search queries, and now I can support my comment a bit. Check process.c , line 439 onwards.

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

+5
source

I am not the author of the Linux kernel, but the most likely answer is that function names appear more often in the index of IDE files than comments.

+1
source

Source: https://habr.com/ru/post/1308380/


All Articles