diff options
| author | Mikhail Romanko <me@blankhex.com> | 2024-04-13 14:52:29 +0300 |
|---|---|---|
| committer | Mikhail Romanko <me@blankhex.com> | 2024-04-13 14:52:29 +0300 |
| commit | ac5df0ebe9a6ac67b9be4cc319f5cd0625b50178 (patch) | |
| tree | 5532f9fd219691476fb3be127f228f3a07325e4b /include/bh/internal/queue.h | |
| download | bhlib-old-ac5df0ebe9a6ac67b9be4cc319f5cd0625b50178.tar.gz | |
Initial commit
Diffstat (limited to 'include/bh/internal/queue.h')
| -rw-r--r-- | include/bh/internal/queue.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/include/bh/internal/queue.h b/include/bh/internal/queue.h new file mode 100644 index 0000000..13a6cad --- /dev/null +++ b/include/bh/internal/queue.h @@ -0,0 +1,35 @@ +#ifndef BHLIB_INTERNAL_QUEUE_H +#define BHLIB_INTERNAL_QUEUE_H + +#include <bh/queue.h> + +struct bh_queue_s +{ + void **data; + size_t size; + size_t head; + size_t tail; + size_t capacity; +}; + +/** + * @internal + * @brief Initialize embedded queue object. + * + * @param queue Valid pointer to the queue object. + * + * @sa bh_queue_destroy + */ +void bh_queue_init(bh_queue_t *queue); + +/** + * @internal + * @brief Destroy embedded queue object. + * + * @param queue Valid pointer to the queue object. + * + * @sa bh_queue_init + */ +void bh_queue_destroy(bh_queue_t *queue); + +#endif /* BHLIB_INTERNAL_QUEUE_H */ |
