[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-rt-users
Subject: [RFC v0 1/9] hackbench: Don't re-assign context for each fd
From: Daniel Wagner <daniel.wagner () bmw-carit ! de>
Date: 2014-11-05 9:09:37
Message-ID: 1415178585-3192-2-git-send-email-daniel.wagner () bmw-carit ! de
[Download RAW message or body]
A small optimization. Setting it once is enough.
Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
---
src/hackbench/hackbench.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/hackbench/hackbench.c b/src/hackbench/hackbench.c
index 34a27ef..c42257c 100644
--- a/src/hackbench/hackbench.c
+++ b/src/hackbench/hackbench.c
@@ -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;
--
1.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic