Lines Matching +full:multi +full:- +full:attr

1 // SPDX-License-Identifier: GPL-2.0
4 * sched-messaging.c
13 #include <subcmd/parse-options.h>
81 if (poll(&pollfd, 1, -1) != 1) in ready()
91 ready(ctx->ready_out, ctx->wakefd); in sender()
96 for (j = 0; j < ctx->num_fds; j++) { in sender()
100 ret = write(ctx->out_fds[j], data + done, in sender()
101 sizeof(data)-done); in sender()
120 close(ctx->in_fds[1]); in receiver()
123 ready(ctx->ready_out, ctx->wakefd); in receiver()
126 for (i = 0; i < ctx->num_packets; i++) { in receiver()
131 ret = read(ctx->in_fds[0], data + done, DATASIZE - done); in receiver()
144 pthread_attr_t attr; in create_worker() local
152 case -1: in create_worker()
166 if (pthread_attr_init(&attr) != 0) in create_worker()
170 if (pthread_attr_setstacksize(&attr, PTHREAD_STACK_MIN) != 0) in create_worker()
174 ret = pthread_create(&childid, &attr, func, ctx); in create_worker()
178 pthread_attr_destroy(&attr); in create_worker()
210 list_add(&snd_ctx->list, &sender_contexts); in group()
218 list_add(&ctx->list, &receiver_contexts); in group()
223 ctx->num_packets = num_fds * nr_loops; in group()
224 ctx->in_fds[0] = fds[0]; in group()
225 ctx->in_fds[1] = fds[1]; in group()
226 ctx->ready_out = ready_out; in group()
227 ctx->wakefd = wakefd; in group()
231 snd_ctx->out_fds[i] = fds[1]; in group()
238 snd_ctx->ready_out = ready_out; in group()
239 snd_ctx->wakefd = wakefd; in group()
240 snd_ctx->num_fds = num_fds; in group()
248 close(snd_ctx->out_fds[i]); in group()
258 "Be multi thread instead of multi process"),
337 list_del_init(&pos->list); in bench_sched_messaging()
341 list_del_init(&pos->list); in bench_sched_messaging()