From 26075dcbab6b33b63141d8fff4b75a5d99182dce Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sat, 7 Aug 2021 17:41:19 -0700 Subject: Remove separate protocol initialization step. Nothing is using this, but it adds complexity and also requires additional lock activity each time a socket is opened. --- src/core/protocol.h | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'src/core/protocol.h') diff --git a/src/core/protocol.h b/src/core/protocol.h index 4edebfc2..a8645763 100644 --- a/src/core/protocol.h +++ b/src/core/protocol.h @@ -52,7 +52,7 @@ struct nni_proto_pipe_ops { // pipe_stop is called during finalization, to ensure that // the protocol is absolutely finished with the pipe. It should // wait if necessary to ensure that the pipe is not referenced - // anymore by the protocol. It should not destroy resources. + // any more by the protocol. It should not destroy resources. void (*pipe_stop)(void *); }; @@ -125,15 +125,6 @@ struct nni_proto { const nni_proto_sock_ops *proto_sock_ops; // Per-socket operations const nni_proto_pipe_ops *proto_pipe_ops; // Per-pipe operations const nni_proto_ctx_ops * proto_ctx_ops; // Context operations - - // proto_init, if not NULL, provides a function that initializes - // global values. The main purpose of this may be to initialize - // protocol option values. - int (*proto_init)(void); - - // proto_fini, if not NULL, is called at shutdown, to release - // any resources allocated at proto_init time. - void (*proto_fini)(void); }; // We quite intentionally use a signature where the upper word is nonzero, @@ -144,8 +135,8 @@ struct nni_proto { // during the life of the project. If we add a new version, please keep // the old version around -- it may be possible to automatically convert // older versions in the future. -#define NNI_PROTOCOL_V2 0x50520002u // "pr\0\2" -#define NNI_PROTOCOL_VERSION NNI_PROTOCOL_V2 +#define NNI_PROTOCOL_V3 0x50520003u // "pr\0\3" +#define NNI_PROTOCOL_VERSION NNI_PROTOCOL_V3 // These flags determine which operations make sense. We use them so that // we can reject attempts to create notification fds for operations that make @@ -194,7 +185,4 @@ extern int nni_proto_open(nng_socket *, const nni_proto *); // STARv0 100 0 star mangos only, experimental // -extern int nni_proto_sys_init(void); -extern void nni_proto_sys_fini(void); - #endif // CORE_PROTOCOL_H -- cgit v1.2.3-70-g09d2