From 357169a38a0e0c0edd4b4f8a097718f6af7773ce Mon Sep 17 00:00:00 2001 From: jeka Date: Thu, 5 Mar 2026 15:03:27 +0300 Subject: [PATCH] 1 --- lib/ll_queue.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/ll_queue.c b/lib/ll_queue.c index 7589687c..4df69893 100644 --- a/lib/ll_queue.c +++ b/lib/ll_queue.c @@ -224,7 +224,7 @@ static void check_waiters(struct ll_queue* q) { int queue_data_put(struct ll_queue* q, struct ll_entry* entry, uint32_t id) { if (!q || !entry) return -1; - + entry->id = id; // Проверить лимит размера @@ -262,6 +262,7 @@ int queue_data_put(struct ll_queue* q, struct ll_entry* entry, uint32_t id) { // Проверить ожидающие коллбэки check_waiters(q); + queue_check_consistency(q);// !!!! for debug return 0; } @@ -302,12 +303,13 @@ int queue_data_put_first(struct ll_queue* q, struct ll_entry* entry, uint32_t id // Проверить ожидающие коллбэки check_waiters(q); + queue_check_consistency(q);// !!!! for debug return 0; } struct ll_entry* queue_data_get(struct ll_queue* q) { if (!q || !q->head) return NULL; - + struct ll_entry* entry = q->head; q->head = entry->next; @@ -330,6 +332,7 @@ struct ll_entry* queue_data_get(struct ll_queue* q) { // Проверить ожидающие коллбэки check_waiters(q); + queue_check_consistency(q);// !!!! for debug return entry; } @@ -447,6 +450,7 @@ int queue_remove_data(struct ll_queue* q, struct ll_entry* entry) { remove_from_hash(q, entry); // DEBUG_DEBUG(DEBUG_CATEGORY_LL_QUEUE, "queue_remove_data: removed entry %p (id=%u), count=%d", entry, entry->id, q->count); + queue_check_consistency(q);// !!!! for debug return 0; } \ No newline at end of file