diff options
| author | Garrett D'Amore <garrett@damore.org> | 2020-02-06 01:04:22 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2020-02-06 01:22:15 -0800 |
| commit | 105bb7216101514a4563252775bcbf1650abadc9 (patch) | |
| tree | fa9022535bf6b5e27e7fa5cbe985bc3ec6525470 /src/protocol/pair1 | |
| parent | 11335aa5584ef689c9335df3a97668fe62b8418c (diff) | |
| download | nng-105bb7216101514a4563252775bcbf1650abadc9.tar.gz nng-105bb7216101514a4563252775bcbf1650abadc9.tar.bz2 nng-105bb7216101514a4563252775bcbf1650abadc9.zip | |
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.
Diffstat (limited to 'src/protocol/pair1')
| -rw-r--r-- | src/protocol/pair1/pair.c | 22 |
1 files changed, 11 insertions, 11 deletions
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); } |
