diff options
| author | Garrett D'Amore <garrett@damore.org> | 2016-12-13 23:55:18 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2016-12-13 23:55:18 -0800 |
| commit | 810c67b859465c6d9c29954b14f2da9a7408de32 (patch) | |
| tree | d8d9504beef16a45af26813d2cbb49f3b9f022d9 /src/core | |
| parent | ec9f917101371baaae34ca10ae952392c2c2343d (diff) | |
| download | nng-810c67b859465c6d9c29954b14f2da9a7408de32.tar.gz nng-810c67b859465c6d9c29954b14f2da9a7408de32.tar.bz2 nng-810c67b859465c6d9c29954b14f2da9a7408de32.zip | |
Initial swing at pair protocol.
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/protocol.h | 11 | ||||
| -rw-r--r-- | src/core/socket.c | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/core/protocol.h b/src/core/protocol.h index f7b7b49b..a6000863 100644 --- a/src/core/protocol.h +++ b/src/core/protocol.h @@ -34,11 +34,10 @@ * As a consequence, most of the concurrency in nng exists in the protocol * implementations. * - * A special exception to this is nni_pipe_close(), which actually does - * call back into the socket, which will then call the protocol's add - * pipe methods. Its therefore important that no locks are held by the - * protocol during nni_pipe_close(). (Generally, its preferred that the - * protocol do not hold locks across calls to any pipe functions.) + * Pipe operations may block, or even reenter the protoccol entry points + * (for example nni_pipe_close() causes the protocols proto_remove_pipe + * entry point to be called), so it is very important that protocols do + * not hold any locks across calls to pipe functions. */ struct nni_protocol { @@ -77,7 +76,7 @@ struct nni_protocol { * Option manipulation. These may be NULL. */ int (*proto_setopt)(void *, int, const void *, size_t); - int (*proto_getopt)(void *, int, void **, size_t *); + int (*proto_getopt)(void *, int, void *, size_t *); /* * Receive filter. This may be NULL, but if it isn't, then diff --git a/src/core/socket.c b/src/core/socket.c index 5b93454d..ee436bb2 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -47,7 +47,7 @@ struct nng_socket { * the upper read and write queues. */ nni_msgqueue_t -nng_socket_sendq(nng_socket_t s) +nni_socket_sendq(nng_socket_t s) { return (s->s_uwq); } |
