]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/kern/circle_queue.h
xnu-6153.101.6.tar.gz
[apple/xnu.git] / osfmk / kern / circle_queue.h
index 4ec2af237bcfe33cb05ed315abb492d131adc406..8d9453f5f3d8ccc6bd0b194ff6c2c5a6432d80f0 100644 (file)
@@ -149,6 +149,24 @@ circle_dequeue_tail(circle_queue_t cq)
        return elt;
 }
 
+static inline void
+circle_queue_rotate_head_forward(circle_queue_t cq)
+{
+       queue_entry_t first = circle_queue_first(cq);
+       if (first != NULL) {
+               cq->head = first->next;
+       }
+}
+
+static inline void
+circle_queue_rotate_head_backward(circle_queue_t cq)
+{
+       queue_entry_t last = circle_queue_last(cq);
+       if (last != NULL) {
+               cq->head = last;
+       }
+}
+
 /*
  *     Macro:          cqe_element
  *     Function: