Hi all
I'm learning scheduling algorithm and reading sched.c (http://lxr.linux.no/linux+v2.6.11/kernel/sched.c) , and come up with a question.
As C FAQ 10.6 points out, macro definitions and struct declarations should be put in header files(http://c-faq.com/cpp/hfiles.html)
But sched.c violates this convention and put all the definitions and declarations in a single .c file, so is there any advantage of doing this instead of creating another sched.h?
Many thanks for your reply.
I'm learning scheduling algorithm and reading sched.c (http://lxr.linux.no/linux+v2.6.11/kernel/sched.c) , and come up with a question.
As C FAQ 10.6 points out, macro definitions and struct declarations should be put in header files(http://c-faq.com/cpp/hfiles.html)
But sched.c violates this convention and put all the definitions and declarations in a single .c file, so is there any advantage of doing this instead of creating another sched.h?
Many thanks for your reply.