1
This commit is contained in:
1 parent
5e4db00d4b
commit
357169a38a
1 file changed
+6
-2
+6
-2
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user