kthread: kthread worker API cleanup
[deliverable/linux.git] / kernel / kthread.c
index 0bec14aa844e1d17be1b7b24968b1853560fb3f5..20bdf2c8d0f5fe02ebd075b55ba370f9f77e50bf 100644 (file)
@@ -536,7 +536,7 @@ int kthreadd(void *unused)
        return 0;
 }
 
-void __init_kthread_worker(struct kthread_worker *worker,
+void __kthread_init_worker(struct kthread_worker *worker,
                                const char *name,
                                struct lock_class_key *key)
 {
@@ -545,7 +545,7 @@ void __init_kthread_worker(struct kthread_worker *worker,
        INIT_LIST_HEAD(&worker->work_list);
        worker->task = NULL;
 }
-EXPORT_SYMBOL_GPL(__init_kthread_worker);
+EXPORT_SYMBOL_GPL(__kthread_init_worker);
 
 /**
  * kthread_worker_fn - kthread function to process kthread_worker
@@ -602,7 +602,7 @@ repeat:
 EXPORT_SYMBOL_GPL(kthread_worker_fn);
 
 /* insert @work before @pos in @worker */
-static void insert_kthread_work(struct kthread_worker *worker,
+static void kthread_insert_work(struct kthread_worker *worker,
                               struct kthread_work *work,
                               struct list_head *pos)
 {
@@ -615,7 +615,7 @@ static void insert_kthread_work(struct kthread_worker *worker,
 }
 
 /**
- * queue_kthread_work - queue a kthread_work
+ * kthread_queue_work - queue a kthread_work
  * @worker: target kthread_worker
  * @work: kthread_work to queue
  *
@@ -623,7 +623,7 @@ static void insert_kthread_work(struct kthread_worker *worker,
  * must have been created with kthread_worker_create().  Returns %true
  * if @work was successfully queued, %false if it was already pending.
  */
-bool queue_kthread_work(struct kthread_worker *worker,
+bool kthread_queue_work(struct kthread_worker *worker,
                        struct kthread_work *work)
 {
        bool ret = false;
@@ -631,13 +631,13 @@ bool queue_kthread_work(struct kthread_worker *worker,
 
        spin_lock_irqsave(&worker->lock, flags);
        if (list_empty(&work->node)) {
-               insert_kthread_work(worker, work, &worker->work_list);
+               kthread_insert_work(worker, work, &worker->work_list);
                ret = true;
        }
        spin_unlock_irqrestore(&worker->lock, flags);
        return ret;
 }
-EXPORT_SYMBOL_GPL(queue_kthread_work);
+EXPORT_SYMBOL_GPL(kthread_queue_work);
 
 struct kthread_flush_work {
        struct kthread_work     work;
@@ -652,12 +652,12 @@ static void kthread_flush_work_fn(struct kthread_work *work)
 }
 
 /**
- * flush_kthread_work - flush a kthread_work
+ * kthread_flush_work - flush a kthread_work
  * @work: work to flush
  *
  * If @work is queued or executing, wait for it to finish execution.
  */
-void flush_kthread_work(struct kthread_work *work)
+void kthread_flush_work(struct kthread_work *work)
 {
        struct kthread_flush_work fwork = {
                KTHREAD_WORK_INIT(fwork.work, kthread_flush_work_fn),
@@ -678,9 +678,10 @@ retry:
        }
 
        if (!list_empty(&work->node))
-               insert_kthread_work(worker, &fwork.work, work->node.next);
+               kthread_insert_work(worker, &fwork.work, work->node.next);
        else if (worker->current_work == work)
-               insert_kthread_work(worker, &fwork.work, worker->work_list.next);
+               kthread_insert_work(worker, &fwork.work,
+                                   worker->work_list.next);
        else
                noop = true;
 
@@ -689,23 +690,23 @@ retry:
        if (!noop)
                wait_for_completion(&fwork.done);
 }
-EXPORT_SYMBOL_GPL(flush_kthread_work);
+EXPORT_SYMBOL_GPL(kthread_flush_work);
 
 /**
- * flush_kthread_worker - flush all current works on a kthread_worker
+ * kthread_flush_worker - flush all current works on a kthread_worker
  * @worker: worker to flush
  *
  * Wait until all currently executing or pending works on @worker are
  * finished.
  */
-void flush_kthread_worker(struct kthread_worker *worker)
+void kthread_flush_worker(struct kthread_worker *worker)
 {
        struct kthread_flush_work fwork = {
                KTHREAD_WORK_INIT(fwork.work, kthread_flush_work_fn),
                COMPLETION_INITIALIZER_ONSTACK(fwork.done),
        };
 
-       queue_kthread_work(worker, &fwork.work);
+       kthread_queue_work(worker, &fwork.work);
        wait_for_completion(&fwork.done);
 }
-EXPORT_SYMBOL_GPL(flush_kthread_worker);
+EXPORT_SYMBOL_GPL(kthread_flush_worker);
This page took 0.025983 seconds and 5 git commands to generate.