| .. | .. |
|---|
| 10 | 10 | * |
|---|
| 11 | 11 | */ |
|---|
| 12 | 12 | |
|---|
| 13 | | -#include "../perf.h" |
|---|
| 14 | | -#include "../util/util.h" |
|---|
| 15 | 13 | #include <subcmd/parse-options.h> |
|---|
| 16 | | -#include "../builtin.h" |
|---|
| 17 | 14 | #include "bench.h" |
|---|
| 18 | 15 | |
|---|
| 19 | 16 | /* Test groups of 20 processes spraying to 20 receivers */ |
|---|
| .. | .. |
|---|
| 43 | 40 | unsigned int num_fds; |
|---|
| 44 | 41 | int ready_out; |
|---|
| 45 | 42 | int wakefd; |
|---|
| 46 | | - int out_fds[0]; |
|---|
| 43 | + int out_fds[]; |
|---|
| 47 | 44 | }; |
|---|
| 48 | 45 | |
|---|
| 49 | 46 | struct receiver_context { |
|---|
| .. | .. |
|---|
| 69 | 66 | /* Block until we're ready to go */ |
|---|
| 70 | 67 | static void ready(int ready_out, int wakefd) |
|---|
| 71 | 68 | { |
|---|
| 72 | | - char dummy; |
|---|
| 73 | 69 | struct pollfd pollfd = { .fd = wakefd, .events = POLLIN }; |
|---|
| 74 | 70 | |
|---|
| 75 | 71 | /* Tell them we're ready. */ |
|---|
| 76 | | - if (write(ready_out, &dummy, 1) != 1) |
|---|
| 72 | + if (write(ready_out, "R", 1) != 1) |
|---|
| 77 | 73 | err(EXIT_FAILURE, "CLIENT: ready write"); |
|---|
| 78 | 74 | |
|---|
| 79 | 75 | /* Wait for "GO" signal */ |
|---|
| .. | .. |
|---|
| 88 | 84 | unsigned int i, j; |
|---|
| 89 | 85 | |
|---|
| 90 | 86 | ready(ctx->ready_out, ctx->wakefd); |
|---|
| 87 | + memset(data, 'S', sizeof(data)); |
|---|
| 91 | 88 | |
|---|
| 92 | 89 | /* Now pump to every receiver. */ |
|---|
| 93 | 90 | for (i = 0; i < nr_loops; i++) { |
|---|