Searched refs:cq (Results 1 – 1 of 1) sorted by relevance
903 static inline void __cq_init(struct circular_queue *cq) in __cq_init() argument905 cq->front = cq->rear = 0; in __cq_init()909 static inline int __cq_empty(struct circular_queue *cq) in __cq_empty() argument911 return (cq->front == cq->rear); in __cq_empty()914 static inline int __cq_full(struct circular_queue *cq) in __cq_full() argument916 return ((cq->rear + 1) & CQ_MASK) == cq->front; in __cq_full()919 static inline int __cq_enqueue(struct circular_queue *cq, unsigned long elem) in __cq_enqueue() argument921 if (__cq_full(cq)) in __cq_enqueue()924 cq->element[cq->rear] = elem; in __cq_enqueue()925 cq->rear = (cq->rear + 1) & CQ_MASK; in __cq_enqueue()[all …]