diff options
Diffstat (limited to 'src/core/lmq.h')
| -rw-r--r-- | src/core/lmq.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/lmq.h b/src/core/lmq.h index 0a64c984..e38a7441 100644 --- a/src/core/lmq.h +++ b/src/core/lmq.h @@ -1,5 +1,5 @@ // -// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2021 Staysail Systems, Inc. <info@staysail.tech> // // This software is supplied under the terms of the MIT License, a // copy of which should be located in the distribution where this @@ -23,15 +23,16 @@ typedef struct nni_lmq { size_t lmq_get; size_t lmq_put; nng_msg **lmq_msgs; + nng_msg *lmq_buf[2]; // default minimal buffer } nni_lmq; -extern int nni_lmq_init(nni_lmq *, size_t); +extern void nni_lmq_init(nni_lmq *, size_t); extern void nni_lmq_fini(nni_lmq *); extern void nni_lmq_flush(nni_lmq *); extern size_t nni_lmq_len(nni_lmq *); extern size_t nni_lmq_cap(nni_lmq *); -extern int nni_lmq_putq(nni_lmq *, nng_msg *); -extern int nni_lmq_getq(nni_lmq *, nng_msg **); +extern int nni_lmq_put(nni_lmq *lmq, nng_msg *msg); +extern int nni_lmq_get(nni_lmq *lmq, nng_msg **mp); extern int nni_lmq_resize(nni_lmq *, size_t); extern bool nni_lmq_full(nni_lmq *); extern bool nni_lmq_empty(nni_lmq *); |
