diff options
| author | Garrett D'Amore <garrett@damore.org> | 2016-12-22 15:23:21 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2016-12-22 15:23:21 -0800 |
| commit | 934c1316ae47754a2e368c65228c3cbfe552680f (patch) | |
| tree | e81c4d2854df83e3d908c9269dd35c0600fa6acb /src/core/socket.h | |
| parent | ee969ad99dc1e07e1c38876223e7aed13463b121 (diff) | |
| download | nng-934c1316ae47754a2e368c65228c3cbfe552680f.tar.gz nng-934c1316ae47754a2e368c65228c3cbfe552680f.tar.bz2 nng-934c1316ae47754a2e368c65228c3cbfe552680f.zip | |
Inline locks (fewer allocs), simpler absolute times for wakeups. nn_sock_recv.
Diffstat (limited to 'src/core/socket.h')
| -rw-r--r-- | src/core/socket.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/core/socket.h b/src/core/socket.h index 55944c92..ec4acfdb 100644 --- a/src/core/socket.h +++ b/src/core/socket.h @@ -14,24 +14,25 @@ // OUSIDE of the core is STRICTLY VERBOTEN. NO DIRECT ACCESS BY PROTOCOLS OR // TRANSPORTS. struct nng_socket { - nni_mutex_t s_mx; - nni_cond_t s_cv; + nni_mutex s_mx; + nni_cond s_cv; - nni_msgqueue_t s_uwq; // Upper write queue - nni_msgqueue_t s_urq; // Upper read queue + nni_msgqueue * s_uwq; // Upper write queue + nni_msgqueue * s_urq; // Upper read queue - struct nni_protocol s_ops; + nni_protocol s_ops; - void * s_data; // Protocol private + void * s_data; // Protocol private // XXX: options - nni_list_t s_eps; - nni_list_t s_pipes; + nni_list_t s_eps; + nni_list_t s_pipes; - int s_closing; // Socket is closing - int s_besteffort; // Best effort mode delivery - int s_senderr; // Protocol state machine use + int s_closing; // Socket is closing + int s_besteffort; // Best effort mode delivery + int s_senderr; // Protocol state machine use + int s_recverr; // Protocol state machine use }; extern int nni_socket_create(nni_socket **, uint16_t); |
