Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97101
b: refs/heads/master
c: d3ede32
h: refs/heads/master
i:
  97099: 949790d
v: v3
  • Loading branch information
Denis V. Lunev authored and David S. Miller committed May 20, 2008
1 parent 12b25bc commit dacb429
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5fb13570543f4ae022996c9d7c0c099c8abf22dd
refs/heads/master: d3ede327e83f202c3a0962e207318f65717c5eb7
4 changes: 4 additions & 0 deletions trunk/net/core/pktgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ struct pktgen_thread {
int cpu;

wait_queue_head_t queue;
struct completion start_done;
};

#define REMOVE 1
Expand Down Expand Up @@ -3414,6 +3415,7 @@ static int pktgen_thread_worker(void *arg)
BUG_ON(smp_processor_id() != cpu);

init_waitqueue_head(&t->queue);
complete(&t->start_done);

pr_debug("pktgen: starting pktgen/%d: pid=%d\n", cpu, task_pid_nr(current));

Expand Down Expand Up @@ -3615,6 +3617,7 @@ static int __init pktgen_create_thread(int cpu)
INIT_LIST_HEAD(&t->if_list);

list_add_tail(&t->th_list, &pktgen_threads);
init_completion(&t->start_done);

p = kthread_create(pktgen_thread_worker, t, "kpktgend_%d", cpu);
if (IS_ERR(p)) {
Expand All @@ -3639,6 +3642,7 @@ static int __init pktgen_create_thread(int cpu)
}

wake_up_process(p);
wait_for_completion(&t->start_done);

return 0;
}
Expand Down

0 comments on commit dacb429

Please sign in to comment.