diff options
author | sanine <sanine.not@pm.me> | 2022-04-04 13:40:20 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2022-04-04 13:40:20 -0500 |
commit | 5e3d8e950d97a222b15d41de1ae17ccf51621471 (patch) | |
tree | cbf807e36097d498d40b7acd196de22834e882b3 /lily-test.c | |
parent | 29179fc15a1d085299601267fe0bc9c6be5dfa1c (diff) |
refactor: rename lily_mock_queue_t -> lily_queue_t
Diffstat (limited to 'lily-test.c')
-rw-r--r-- | lily-test.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lily-test.c b/lily-test.c index 17959ca..0581263 100644 --- a/lily-test.c +++ b/lily-test.c @@ -187,11 +187,11 @@ void _lily_assert_memory_not_equal(const char *name_a, const char *name_b, } -lily_mock_queue_t* lily_queue_create() +lily_queue_t* lily_queue_create() { const size_t size = 256 * sizeof(uint8_t); - lily_mock_queue_t *q = malloc(sizeof(lily_mock_queue_t)); + lily_queue_t *q = malloc(sizeof(lily_queue_t)); q->buf_size = size; q->buf = malloc(size); q->front = q->buf; @@ -201,14 +201,14 @@ lily_mock_queue_t* lily_queue_create() } -void lily_queue_destroy(lily_mock_queue_t *q) +void lily_queue_destroy(lily_queue_t *q) { free(q->buf); free(q); } -void _lily_enqueue(lily_mock_queue_t *q, size_t size, uint8_t *data) +void _lily_enqueue(lily_queue_t *q, size_t size, uint8_t *data) { size_t used = q->back - q->buf; size_t remaining = q->buf_size - used; @@ -230,7 +230,7 @@ void _lily_enqueue(lily_mock_queue_t *q, size_t size, uint8_t *data) } -void _lily_dequeue(lily_mock_queue_t *q, size_t size, uint8_t *ptr) +void _lily_dequeue(lily_queue_t *q, size_t size, uint8_t *ptr) { size_t dist = q->back - q->front; if (dist < size) { |