hackbench: Don't re-assign context for each fd

A small optimization. Setting it once is enough.

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
This commit is contained in:
Daniel Wagner 2014-11-05 10:09:37 +01:00 committed by Clark Williams
parent 536baa7648
commit b45ce03638
1 changed files with 4 additions and 4 deletions

View File

@ -326,12 +326,12 @@ static unsigned int group(childinfo_t *child,
close(fds[0]);
}
snd_ctx->ready_out = ready_out;
snd_ctx->wakefd = wakefd;
snd_ctx->num_fds = num_fds;
/* Now we have all the fds, fork the senders */
for (i = 0; i < num_fds; i++) {
snd_ctx->ready_out = ready_out;
snd_ctx->wakefd = wakefd;
snd_ctx->num_fds = num_fds;
child[tab_offset+num_fds+i] = create_worker(snd_ctx, (void *)(void *)sender);
if( child[tab_offset+num_fds+i].error < 0 ) {
return (num_fds+i)-1;