kernel/sched.c - Use the task state macros provided in include/linux/sched.h
Hello all,
I am working on a a kernel janitor project to use the task state macros provided in the include/linux/sched.h instead of setting the task state directly. Ingo suggested I bring the discussion to this list to see if this janitor project is still valid, or the best way to impliment this project.
The entire kernel janitor thread can be found here:
http://sourceforge.net/mailarchive/forum.php?thread_id=908916&forum_id=2314
Thanks,
- Ryan
Quoted 5 lines · Ingo Molnar
Quoted 2 lines · Ryan Bradetich
Finally, since this is a janitor project, and I have only receieved feedback from you, should I continue generating these patches and
have
Quoted 1 line
Quoted 1 line
the maintainers reject the patches if they feel it makes the code
less
Quoted 3 lines
Quoted 1 line
clear? Or should I just abandon the project?
Using the macro has one more advantage i did not consider: it shows
that
Quoted 1 line
the maintainer has considered the SMP issues and has intentionally
decided
Quoted 1 line
to use one of the two variants. So it's not just a simple wrapping of
an
Quoted 3 lines
assignment.
Quoted 1 line
I guess what I would like to see is the task change state done
fairly
Quoted 2 lines
Quoted 2 lines
consistently throught the kernel ... lots of places already use the __set_[current_task]_state macros, while other set the state
directly. I
Quoted 1 line
Quoted 1 line
also realize maintenance is more important then look/feel
consistenance.
Quoted 2 lines
in 2.5.26, 555 places use it directly, 128 places use the
__set_*_state
Quoted 7 lines
macros, 865 places use the SMP-safe set_*_state macros.
perhaps it might make sense to raise the issue on the kernel-list?
Ingo