提交 e700591a 编写于 作者: P Petr Mladek 提交者: Linus Torvalds

kthread: rename probe_kthread_data() to kthread_probe_data()

Patch series "kthread: Kthread worker API improvements"

The intention of this patchset is to make it easier to manipulate and
maintain kthreads.  Especially, I want to replace all the custom main
cycles with a generic one.  Also I want to make the kthreads sleep in a
consistent state in a common place when there is no work.

This patch (of 11):

A good practice is to prefix the names of functions by the name of the
subsystem.

This patch fixes the name of probe_kthread_data().  The other wrong
functions names are part of the kthread worker API and will be fixed
separately.

Link: http://lkml.kernel.org/r/1470754545-17632-2-git-send-email-pmladek@suse.comSigned-off-by: NPetr Mladek <pmladek@suse.com>
Suggested-by: NAndrew Morton <akpm@linux-foundation.org>
Acked-by: NTejun Heo <tj@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Borislav Petkov <bp@suse.de>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 d0c75f33
...@@ -44,7 +44,7 @@ bool kthread_should_stop(void); ...@@ -44,7 +44,7 @@ bool kthread_should_stop(void);
bool kthread_should_park(void); bool kthread_should_park(void);
bool kthread_freezable_should_stop(bool *was_frozen); bool kthread_freezable_should_stop(bool *was_frozen);
void *kthread_data(struct task_struct *k); void *kthread_data(struct task_struct *k);
void *probe_kthread_data(struct task_struct *k); void *kthread_probe_data(struct task_struct *k);
int kthread_park(struct task_struct *k); int kthread_park(struct task_struct *k);
void kthread_unpark(struct task_struct *k); void kthread_unpark(struct task_struct *k);
void kthread_parkme(void); void kthread_parkme(void);
......
...@@ -138,7 +138,7 @@ void *kthread_data(struct task_struct *task) ...@@ -138,7 +138,7 @@ void *kthread_data(struct task_struct *task)
} }
/** /**
* probe_kthread_data - speculative version of kthread_data() * kthread_probe_data - speculative version of kthread_data()
* @task: possible kthread task in question * @task: possible kthread task in question
* *
* @task could be a kthread task. Return the data value specified when it * @task could be a kthread task. Return the data value specified when it
...@@ -146,7 +146,7 @@ void *kthread_data(struct task_struct *task) ...@@ -146,7 +146,7 @@ void *kthread_data(struct task_struct *task)
* inaccessible for any reason, %NULL is returned. This function requires * inaccessible for any reason, %NULL is returned. This function requires
* that @task itself is safe to dereference. * that @task itself is safe to dereference.
*/ */
void *probe_kthread_data(struct task_struct *task) void *kthread_probe_data(struct task_struct *task)
{ {
struct kthread *kthread = to_kthread(task); struct kthread *kthread = to_kthread(task);
void *data = NULL; void *data = NULL;
......
...@@ -4261,7 +4261,7 @@ void print_worker_info(const char *log_lvl, struct task_struct *task) ...@@ -4261,7 +4261,7 @@ void print_worker_info(const char *log_lvl, struct task_struct *task)
* This function is called without any synchronization and @task * This function is called without any synchronization and @task
* could be in any state. Be careful with dereferences. * could be in any state. Be careful with dereferences.
*/ */
worker = probe_kthread_data(task); worker = kthread_probe_data(task);
/* /*
* Carefully copy the associated workqueue's workfn and name. Keep * Carefully copy the associated workqueue's workfn and name. Keep
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册