Re: Unhelpful comments in your code?
Posted: Thu Aug 01, 2013 3:06 pm
While the code flow is simple and require few or none comment, the intention of the function is not.
what kschedule() actually do? does it pick a task, or it also perform the context switch?
do it modify anything in *cpu? can we call with null? what potential issue may arise (machine lock up if all task are blocked)?
do it require spinlock protection surrounding the call? etc.
These all may well be written as comment above the function.
what kschedule() actually do? does it pick a task, or it also perform the context switch?
do it modify anything in *cpu? can we call with null? what potential issue may arise (machine lock up if all task are blocked)?
do it require spinlock protection surrounding the call? etc.
These all may well be written as comment above the function.