From b8a133a9d6c5d8439c1f8ed3153d6a750aae3646 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 19 Mar 2017 16:21:13 -0700 Subject: Eliminate p_active, better names for pipe start and stop. --- src/core/protocol.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/core/protocol.h') diff --git a/src/core/protocol.h b/src/core/protocol.h index 5f7fc4c8..745f5986 100644 --- a/src/core/protocol.h +++ b/src/core/protocol.h @@ -31,18 +31,19 @@ struct nni_proto_pipe_ops { // pipe threads have been stopped. void (*pipe_fini)(void *); - // pipe_add is called to register a pipe with the protocol. The + // pipe_start is called to register a pipe with the protocol. The // protocol can reject this, for example if another pipe is already // active on a 1:1 protocol. The protocol may not block during this, // as the socket lock is held. - int (*pipe_add)(void *); + int (*pipe_start)(void *); - // pipe_rem is called to unregister a pipe from the protocol. + // pipe_stop is called to unregister a pipe from the protocol. // Threads may still acccess data structures, so the protocol // should not free anything yet. This is called with the socket // lock held, so the protocol may not call back into the socket, and - // must not block. - void (*pipe_rem)(void *); + // must not block. This operation must be idempotent, and may + // be called even if pipe_start was not. + void (*pipe_stop)(void *); }; struct nni_proto_sock_ops { -- cgit v1.2.3-70-g09d2