diff options
| author | Garrett D'Amore <garrett@damore.org> | 2025-10-11 06:50:54 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2025-10-11 06:50:54 -0700 |
| commit | 2f24a1b1c93b8c45dce391ed0439131f9ad8cf28 (patch) | |
| tree | 51065064cec7f35b900291fb2a101b7dbe3b6826 /src/core/lmq.c | |
| parent | b98e03b26bfc593326bd7c1d56fd69626f6a93cb (diff) | |
| download | nng-2f24a1b1c93b8c45dce391ed0439131f9ad8cf28.tar.gz nng-2f24a1b1c93b8c45dce391ed0439131f9ad8cf28.tar.bz2 nng-2f24a1b1c93b8c45dce391ed0439131f9ad8cf28.zip | |
fix includes for core
Diffstat (limited to 'src/core/lmq.c')
| -rw-r--r-- | src/core/lmq.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/core/lmq.c b/src/core/lmq.c index d01afe50..5edce182 100644 --- a/src/core/lmq.c +++ b/src/core/lmq.c @@ -7,28 +7,29 @@ // found online at https://opensource.org/licenses/MIT. // -#include "nng_impl.h" +#include "lmq.h" +#include "defs.h" +#include "message.h" // Light-weight message queue. These are derived from our heavy-weight // message queues, but are less "featured", but more useful for // performance sensitive contexts. Locking must be done by the caller. - // Note that initialization of a queue is guaranteed to succeed. // However, if the requested capacity is larger than 2, and memory // cannot be allocated, then the capacity will only be 2. void nni_lmq_init(nni_lmq *lmq, size_t cap) { - lmq->lmq_len = 0; - lmq->lmq_get = 0; - lmq->lmq_put = 0; + lmq->lmq_len = 0; + lmq->lmq_get = 0; + lmq->lmq_put = 0; lmq->lmq_alloc = 0; - lmq->lmq_mask = 0; - lmq->lmq_msgs = NULL; - lmq->lmq_msgs = lmq->lmq_buf; - lmq->lmq_cap = 2; - lmq->lmq_mask = 0x1; // only index 0 and 1 + lmq->lmq_mask = 0; + lmq->lmq_msgs = NULL; + lmq->lmq_msgs = lmq->lmq_buf; + lmq->lmq_cap = 2; + lmq->lmq_mask = 0x1; // only index 0 and 1 if (cap > 2) { (void) nni_lmq_resize(lmq, cap); } else { |
