Lines Matching refs:p_q

343 void GKI_init_q (BUFFER_Q *p_q)
345 p_q->p_first = p_q->p_last = NULL;
346 p_q->count = 0;
737 ** Parameters: p_q - (input) pointer to a queue.
743 void GKI_enqueue (BUFFER_Q *p_q, void *p_buf)
766 if (p_q->p_last)
768 BUFFER_HDR_T *p_last_hdr = (BUFFER_HDR_T *)((UINT8 *)p_q->p_last - BUFFER_HDR_SIZE);
772 p_q->p_first = p_buf;
774 p_q->p_last = p_buf;
775 p_q->count++;
792 ** Parameters: p_q - (input) pointer to a queue.
798 void GKI_enqueue_head (BUFFER_Q *p_q, void *p_buf)
820 if (p_q->p_first)
822 p_hdr->p_next = (BUFFER_HDR_T *)((UINT8 *)p_q->p_first - BUFFER_HDR_SIZE);
823 p_q->p_first = p_buf;
827 p_q->p_first = p_buf;
828 p_q->p_last = p_buf;
831 p_q->count++;
847 ** Parameters: p_q - (input) pointer to a queue.
852 void *GKI_dequeue (BUFFER_Q *p_q)
858 if (!p_q || !p_q->count)
864 p_hdr = (BUFFER_HDR_T *)((UINT8 *)p_q->p_first - BUFFER_HDR_SIZE);
869 p_q->p_first = ((UINT8 *)p_hdr->p_next + BUFFER_HDR_SIZE);
872 p_q->p_first = NULL;
873 p_q->p_last = NULL;
876 p_q->count--;
893 ** Parameters: p_q - (input) pointer to a queue.
899 void *GKI_remove_from_queue (BUFFER_Q *p_q, void *p_buf)
906 if (p_buf == p_q->p_first)
909 return (GKI_dequeue (p_q));
913 p_prev = (BUFFER_HDR_T *)((UINT8 *)p_q->p_first - BUFFER_HDR_SIZE);
923 if (p_buf == p_q->p_last)
924 p_q->p_last = p_prev + 1;
927 p_q->count--;
948 ** Parameters: p_q - (input) pointer to a queue.
953 void *GKI_getfirst (BUFFER_Q *p_q)
955 return (p_q->p_first);
965 ** Parameters: p_q - (input) pointer to a queue.
970 void *GKI_getlast (BUFFER_Q *p_q)
972 return (p_q->p_last);
1006 ** Parameters: p_q - (input) pointer to a queue.
1011 BOOLEAN GKI_queue_is_empty(BUFFER_Q *p_q)
1013 return ((BOOLEAN) (p_q->count == 0));