Lines Matching refs:elementp
116 L2_add(L2el_t *headp, L2el_t *elementp, void *private)
119 ASSERT(headp != NULL && elementp != NULL);
123 elementp->l2_private = private;
125 elementp->l2_nextp = headp;
126 elementp->l2_prevp = headp->l2_prevp;
127 headp->l2_prevp->l2_nextp = elementp;
128 headp->l2_prevp = elementp;
132 L2_delete(L2el_t *elementp)
135 ASSERT(elementp != NULL);
136 ASSERT(elementp->l2_nextp != NULL);
137 ASSERT(elementp->l2_prevp != NULL);
138 ASSERT(elementp->l2_nextp->l2_prevp == elementp);
139 ASSERT(elementp->l2_prevp->l2_nextp == elementp);
141 elementp->l2_prevp->l2_nextp = elementp->l2_nextp;
142 elementp->l2_nextp->l2_prevp = elementp->l2_prevp;
145 elementp->l2_nextp = elementp;
146 elementp->l2_prevp = elementp;
151 L2_add_head(L2el_t *headp, L2el_t *elementp, void *private)
154 ASSERT(headp != NULL && elementp != NULL);
158 elementp->l2_private = private;
160 elementp->l2_prevp = headp;
161 elementp->l2_nextp = headp->l2_nextp;
162 headp->l2_nextp->l2_prevp = elementp;
163 headp->l2_nextp = elementp;
178 L2el_t *elementp;
185 elementp = headp->l2_nextp;
187 headp->l2_nextp = elementp->l2_nextp;
188 elementp->l2_nextp->l2_prevp = headp;
191 elementp->l2_nextp = elementp;
192 elementp->l2_prevp = elementp;
194 return (elementp->l2_private);
198 L2_next(L2el_t *elementp)
201 ASSERT(elementp != NULL);
203 if (L2_EMPTY(elementp))
205 return (elementp->l2_nextp->l2_private);