46QSC_CPLUSPLUS_ENABLED_START
96#define QSC_QUEUE_ALIGNMENT 64ULL
102#define QSC_QUEUE_MAX_DEPTH 64ULL
185#if defined(QSC_DEBUG_MODE)
194QSC_CPLUSPLUS_ENABLED_END
Contains common definitions for the Quantum Secure Cryptographic (QSC) library.
#define QSC_EXPORT_API
API export macro for Microsoft compilers when importing from a DLL.
Definition common.h:520
#define QSC_QUEUE_MAX_DEPTH
The maximum queue depth.
Definition queue.h:102
QSC_EXPORT_API void qsc_queue_push(qsc_queue_state *ctx, const uint8_t *input, size_t inplen, uint64_t tag)
Add an item to the queue.
Definition queue.c:162
QSC_EXPORT_API size_t qsc_queue_items(const qsc_queue_state *ctx)
Get the number of items in the queue.
Definition queue.c:80
QSC_EXPORT_API uint64_t qsc_queue_pop(qsc_queue_state *ctx, uint8_t *output, size_t otplen)
Returns the first member of the queue, and erases that item from the queue.
Definition queue.c:128
QSC_EXPORT_API void qsc_queue_initialize(qsc_queue_state *ctx, size_t depth, size_t width)
Initialize the queue state.
Definition queue.c:53
QSC_EXPORT_API void qsc_queue_dispose(qsc_queue_state *ctx)
Destroy the queue state.
Definition queue.c:7
QSC_EXPORT_API bool qsc_queue_empty(const qsc_queue_state *ctx)
Get the empty status from the queue.
Definition queue.c:112
QSC_EXPORT_API bool qsc_queue_full(const qsc_queue_state *ctx)
Get the full status from the queue.
Definition queue.c:96
QSC_EXPORT_API void qsc_queue_flush(qsc_queue_state *ctx, uint8_t *output)
Flush the content of the queue to an array.
Definition queue.c:31
Contains the queue context state.
Definition queue.h:108
size_t width
Definition queue.h:114
uint64_t tags[QSC_QUEUE_MAX_DEPTH]
Definition queue.h:110
size_t count
Definition queue.h:111
size_t position
Definition queue.h:113
size_t depth
Definition queue.h:112
uint8_t ** queue
Definition queue.h:109