Use a double-linked list for the linked blocking queue so insertions are done in O(1) time

This commit is contained in:
Cameron Gutman
2014-04-02 22:47:49 -04:00
parent 761f324465
commit 8dcf4372f4
6 changed files with 27 additions and 18 deletions

View File

@@ -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;