Lines Matching defs:thread
6 #include "thread-utils.h"
21 struct thread {
37 struct thread *thread = arg;
39 thread->thread_task = current;
41 hlist_add_head(&thread->thread_links, &thread_list);
44 thread->thread_function(thread->thread_data);
46 complete(&thread->thread_done);
51 const char *name, struct thread **new_thread)
56 struct thread *thread;
59 result = vdo_allocate(1, struct thread, __func__, &thread);
65 thread->thread_function = thread_function;
66 thread->thread_data = thread_data;
67 init_completion(&thread->thread_done);
69 * Start the thread, with an appropriate thread name.
72 * threads to have names like "uds:callbackW" and the main test runner thread to be named
75 * Otherwise if the current thread has a name containing a colon character, prefix the name
76 * supplied with the name of the current thread up to (and including) the colon character.
77 * Thus when the "kvdo0:dedupeQ" thread opens an index session, all the threads associated
83 task = kthread_run(thread_starter, thread, "%.*s:%s",
87 task = kthread_run(thread_starter, thread, "%s", name);
91 vdo_free(thread);
95 *new_thread = thread;
99 void vdo_join_threads(struct thread *thread)
101 while (wait_for_completion_interruptible(&thread->thread_done))
105 hlist_del(&thread->thread_links);
107 vdo_free(thread);