提交 5ef64761 编写于 作者: S Steven Rostedt 提交者: Ingo Molnar

pid: fix the do_each_pid_task() macro

Impact: macro side-effects fix

This patch adds parenthesis around 'pid' in the do_each_pid_task
macro to allow callers to pass in more complex parameters.

e.g.  do_each_pid_task(*pid, type, task)
Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 804a6851
...@@ -147,9 +147,9 @@ pid_t pid_vnr(struct pid *pid); ...@@ -147,9 +147,9 @@ pid_t pid_vnr(struct pid *pid);
#define do_each_pid_task(pid, type, task) \ #define do_each_pid_task(pid, type, task) \
do { \ do { \
struct hlist_node *pos___; \ struct hlist_node *pos___; \
if (pid != NULL) \ if ((pid) != NULL) \
hlist_for_each_entry_rcu((task), pos___, \ hlist_for_each_entry_rcu((task), pos___, \
&pid->tasks[type], pids[type].node) { &(pid)->tasks[type], pids[type].node) {
/* /*
* Both old and new leaders may be attached to * Both old and new leaders may be attached to
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册