Lines Matching defs:lp
47 av1394_list_init(av1394_list_t *lp)
49 lp->l_head = lp->l_tail = NULL;
50 lp->l_cnt = 0;
58 av1394_list_head(av1394_list_t *lp)
60 return (lp->l_head);
69 av1394_list_put_tail(av1394_list_t *lp, void *item)
72 ITEM(item)->i_prev = lp->l_tail;
73 if (lp->l_tail == NULL) {
74 ASSERT(lp->l_head == 0);
75 ASSERT(lp->l_cnt == 0);
76 lp->l_head = lp->l_tail = item;
78 lp->l_tail->i_next = item;
79 lp->l_tail = item;
81 lp->l_cnt++;
89 av1394_list_put_head(av1394_list_t *lp, void *item)
91 ITEM(item)->i_next = lp->l_head;
93 if (lp->l_head == NULL) {
94 ASSERT(lp->l_tail == 0);
95 ASSERT(lp->l_cnt == 0);
96 lp->l_head = lp->l_tail = item;
98 lp->l_head->i_prev = item;
99 lp->l_head = item;
101 lp->l_cnt++;
109 av1394_list_get_head(av1394_list_t *lp)
113 item = lp->l_head;
115 lp->l_head = item->i_next;
116 if (item == lp->l_tail) {
117 ASSERT(lp->l_cnt == 1);
118 ASSERT(lp->l_head == NULL);
119 lp->l_tail = NULL;
120 lp->l_cnt = 0;
122 ASSERT(lp->l_cnt > 1);
124 lp->l_cnt--;