From c436e174d0ed8c5dc14af060e994b97a83df7750 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 10 Mar 2017 14:39:21 -0800 Subject: Start of close related race fixes. Scalability test. --- src/core/pipe.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/core/pipe.h') diff --git a/src/core/pipe.h b/src/core/pipe.h index 3ec4a7a3..6cabf4e7 100644 --- a/src/core/pipe.h +++ b/src/core/pipe.h @@ -28,7 +28,8 @@ struct nni_pipe { nni_ep * p_ep; int p_reap; int p_active; - nni_thr p_worker_thr[NNI_MAXWORKERS]; + nni_mtx p_mtx; + int p_refcnt; }; // AIO @@ -40,6 +41,8 @@ extern int nni_pipe_recv(nni_pipe *, nng_msg **); extern int nni_pipe_send(nni_pipe *, nng_msg *); extern uint32_t nni_pipe_id(nni_pipe *); extern void nni_pipe_close(nni_pipe *); +extern void nni_pipe_incref(nni_pipe *); +extern void nni_pipe_decref(nni_pipe *); // Used only by the socket core - as we don't wish to expose the details // of the pipe structure outside of pipe.c. -- cgit v1.2.3-70-g09d2