From 105bb7216101514a4563252775bcbf1650abadc9 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 6 Feb 2020 01:04:22 -0800 Subject: Convert SURVEY to use lmq and avoid message queues. This should make survey a little faster (which may be of benefit). But it will also enable us to eliminate one of the checks in the message queue code (#814), making everything else go faster. --- src/protocol/pair1/pair.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/protocol/pair1') diff --git a/src/protocol/pair1/pair.c b/src/protocol/pair1/pair.c index a3e87bf3..f564195d 100644 --- a/src/protocol/pair1/pair.c +++ b/src/protocol/pair1/pair.c @@ -41,7 +41,7 @@ struct pair1_sock { nni_list plist; bool started; bool poly; - nni_aio aio_get; + nni_aio aio_get; nni_stat_item stat_poly; nni_stat_item stat_raw; nni_stat_item stat_reject_mismatch; @@ -49,7 +49,7 @@ struct pair1_sock { nni_stat_item stat_ttl_drop; nni_stat_item stat_rx_malformed; nni_stat_item stat_tx_malformed; - nni_stat_item stat_tx_drop; + nni_stat_item stat_tx_drop; }; // pair1_pipe is our per-pipe protocol private structure. @@ -111,8 +111,8 @@ pair1_sock_init_impl(void *arg, nni_sock *sock, bool raw) nni_sock_add_stat(sock, &s->stat_ttl_drop); // This can only increment in polyamorous mode. - nni_stat_init_atomic(&s->stat_tx_drop, "tx_drop", - "messages dropped undeliverable"); + nni_stat_init_atomic( + &s->stat_tx_drop, "tx_drop", "messages dropped undeliverable"); nni_stat_set_unit(&s->stat_tx_drop, NNG_UNIT_MESSAGES); nni_sock_add_stat(sock, &s->stat_tx_drop); @@ -129,11 +129,11 @@ pair1_sock_init_impl(void *arg, nni_sock *sock, bool raw) nni_sock_add_stat(sock, &s->stat_tx_malformed); } - s->sock = sock; - s->raw = raw; - s->poly = false; - s->uwq = nni_sock_sendq(sock); - s->urq = nni_sock_recvq(sock); + s->sock = sock; + s->raw = raw; + s->poly = false; + s->uwq = nni_sock_sendq(sock); + s->urq = nni_sock_recvq(sock); nni_atomic_init(&s->ttl); nni_atomic_set(&s->ttl, 8); @@ -191,8 +191,8 @@ pair1_pipe_init(void *arg, nni_pipe *pipe, void *pair) return (rv); } - p->pipe = pipe; - p->pair = pair; + p->pipe = pipe; + p->pair = pair; return (0); } -- cgit v1.2.3-70-g09d2