Use a double-linked list for the linked blocking queue so insertions are done in O(1) time
This commit is contained in:
parent
761f324465
commit
8dcf4372f4
6 changed files with 27 additions and 18 deletions
|
|
@ -35,7 +35,7 @@ void destroyInputStream(void) {
|
|||
entry = LbqDestroyLinkedBlockingQueue(&packetQueue);
|
||||
|
||||
while (entry != NULL) {
|
||||
nextEntry = entry->next;
|
||||
nextEntry = entry->flink;
|
||||
free(entry->data);
|
||||
free(entry);
|
||||
entry = nextEntry;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue