Lines Matching refs:thread
250 struct dmatest_thread *thread;
252 list_for_each_entry(thread, &dtc->threads, node) {
253 if (!thread->done && !thread->pending)
266 struct dmatest_thread *thread;
268 list_for_each_entry(thread, &dtc->threads, node) {
269 if (thread->pending)
430 struct dmatest_thread *thread =
432 if (!thread->done) {
437 * If thread->done, it means that this callback occurred
438 * after the parent thread has cleaned up. This can
569 struct dmatest_thread *thread = data;
570 struct dmatest_done *done = &thread->test_done;
604 thread->pending = false;
605 info = thread->info;
607 chan = thread->chan;
611 src = &thread->src;
612 dst = &thread->dst;
613 if (thread->type == DMA_MEMCPY) {
617 } else if (thread->type == DMA_MEMSET) {
622 } else if (thread->type == DMA_XOR) {
628 } else if (thread->type == DMA_PQ) {
779 if (thread->type == DMA_MEMCPY)
783 else if (thread->type == DMA_MEMSET)
788 else if (thread->type == DMA_XOR)
793 else if (thread->type == DMA_PQ) {
830 wait_event_freezable_timeout(thread->done_wait,
928 thread->done = true;
936 struct dmatest_thread *thread;
940 list_for_each_entry_safe(thread, _thread, &dtc->threads, node) {
941 ret = kthread_stop(thread->task);
942 pr_debug("thread %s exited with status %d\n",
943 thread->task->comm, ret);
944 list_del(&thread->node);
945 put_task_struct(thread->task);
946 kfree(thread);
959 struct dmatest_thread *thread;
976 thread = kzalloc(sizeof(struct dmatest_thread), GFP_KERNEL);
977 if (!thread) {
982 thread->info = info;
983 thread->chan = dtc->chan;
984 thread->type = type;
985 thread->test_done.wait = &thread->done_wait;
986 init_waitqueue_head(&thread->done_wait);
988 thread->task = kthread_create(dmatest_func, thread, "%s-%s%u",
990 if (IS_ERR(thread->task)) {
991 pr_warn("Failed to create thread %s-%s%u\n",
993 kfree(thread);
997 /* srcbuf and dstbuf are allocated by the thread itself */
998 get_task_struct(thread->task);
999 list_add_tail(&thread->node, &dtc->threads);
1000 thread->pending = true;
1123 struct dmatest_thread *thread;
1126 list_for_each_entry(thread, &dtc->threads, node) {
1127 wake_up_process(thread->task);
1311 struct dmatest_thread *thread;
1314 list_for_each_entry(thread, &dtc->threads, node) {