From 1a10ab230ee865ae9f20988b528af87f410c19cc Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Wed, 27 Jan 2016 00:25:06 +0300 Subject: [PATCH] ck_queue: update doc: no tail queue, add STAILQ description Singly-linked tail queue description is taken from sys/queue.h --- include/ck_queue.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/include/ck_queue.h b/include/ck_queue.h index fb92532..c1e9872 100644 --- a/include/ck_queue.h +++ b/include/ck_queue.h @@ -62,8 +62,8 @@ #include /* - * This file defines four types of data structures: singly-linked lists, - * singly-linked tail queues, lists and tail queues. + * This file defines three types of data structures: singly-linked lists, + * singly-linked tail queues and lists. * * A singly-linked list is headed by a single forward pointer. The elements * are singly linked for minimum space and pointer manipulation overhead at @@ -75,6 +75,17 @@ * for applications with large datasets and few or no removals or for * implementing a LIFO queue. * + * A singly-linked tail queue is headed by a pair of pointers, one to the + * head of the list and the other to the tail of the list. The elements are + * singly linked for minimum space and pointer manipulation overhead at the + * expense of O(n) removal for arbitrary elements. New elements can be added + * to the list after an existing element, at the head of the list, or at the + * end of the list. Elements being removed from the head of the tail queue + * should use the explicit macro for this purpose for optimum efficiency. + * A singly-linked tail queue may only be traversed in the forward direction. + * Singly-linked tail queues are ideal for applications with large datasets + * and few or no removals or for implementing a FIFO queue. + * * A list is headed by a single forward pointer (or an array of forward * pointers for a hash table header). The elements are doubly linked * so that an arbitrary element can be removed without a need to