Lines Matching defs:thread
251 struct dmatest_thread *thread;
253 list_for_each_entry(thread, &dtc->threads, node) {
254 if (!thread->done && !thread->pending)
267 struct dmatest_thread *thread;
269 list_for_each_entry(thread, &dtc->threads, node) {
270 if (thread->pending)
431 struct dmatest_thread *thread =
433 if (!thread->done) {
438 * If thread->done, it means that this callback occurred
439 * after the parent thread has cleaned up. This can
570 struct dmatest_thread *thread = data;
571 struct dmatest_done *done = &thread->test_done;
604 thread->pending = false;
605 info = thread->info;
607 chan = thread->chan;
609 src = &thread->src;
610 dst = &thread->dst;
611 if (thread->type == DMA_MEMCPY) {
615 } else if (thread->type == DMA_MEMSET) {
620 } else if (thread->type == DMA_XOR) {
626 } else if (thread->type == DMA_PQ) {
777 if (thread->type == DMA_MEMCPY)
781 else if (thread->type == DMA_MEMSET)
786 else if (thread->type == DMA_XOR)
791 else if (thread->type == DMA_PQ) {
828 wait_event_freezable_timeout(thread->done_wait,
926 thread->done = true;
934 struct dmatest_thread *thread;
938 list_for_each_entry_safe(thread, _thread, &dtc->threads, node) {
939 ret = kthread_stop(thread->task);
940 pr_debug("thread %s exited with status %d\n",
941 thread->task->comm, ret);
942 list_del(&thread->node);
943 put_task_struct(thread->task);
944 kfree(thread);
957 struct dmatest_thread *thread;
974 thread = kzalloc(sizeof(struct dmatest_thread), GFP_KERNEL);
975 if (!thread) {
980 thread->info = info;
981 thread->chan = dtc->chan;
982 thread->type = type;
983 thread->test_done.wait = &thread->done_wait;
984 init_waitqueue_head(&thread->done_wait);
986 thread->task = kthread_create(dmatest_func, thread, "%s-%s%u",
988 if (IS_ERR(thread->task)) {
989 pr_warn("Failed to create thread %s-%s%u\n",
991 kfree(thread);
995 /* srcbuf and dstbuf are allocated by the thread itself */
996 get_task_struct(thread->task);
997 list_add_tail(&thread->node, &dtc->threads);
998 thread->pending = true;
1121 struct dmatest_thread *thread;
1124 list_for_each_entry(thread, &dtc->threads, node) {
1125 wake_up_process(thread->task);
1309 struct dmatest_thread *thread;
1312 list_for_each_entry(thread, &dtc->threads, node) {