Lines Matching refs:q_type

190 #define TW_OSLI_Q_INIT(sc, q_type)	do {				\
191 (sc)->q_stats[q_type].cur_len = 0; \
192 (sc)->q_stats[q_type].max_len = 0; \
196 #define TW_OSLI_Q_INSERT(sc, q_type) do { \
197 struct tw_osli_q_stats *q_stats = &((sc)->q_stats[q_type]); \
204 #define TW_OSLI_Q_REMOVE(sc, q_type) \
205 (sc)->q_stats[q_type].cur_len--
220 tw_osli_req_q_init(struct twa_softc *sc, TW_UINT8 q_type)
222 TW_CL_Q_INIT(&(sc->req_q_head[q_type]));
223 TW_OSLI_Q_INIT(sc, q_type);
228 /* Insert the given request at the head of the given queue (q_type). */
230 tw_osli_req_q_insert_head(struct tw_osli_req_context *req, TW_UINT8 q_type)
233 TW_CL_Q_INSERT_HEAD(&(req->ctlr->req_q_head[q_type]), &(req->link));
234 TW_OSLI_Q_INSERT(req->ctlr, q_type);
240 /* Insert the given request at the tail of the given queue (q_type). */
242 tw_osli_req_q_insert_tail(struct tw_osli_req_context *req, TW_UINT8 q_type)
245 TW_CL_Q_INSERT_TAIL(&(req->ctlr->req_q_head[q_type]), &(req->link));
246 TW_OSLI_Q_INSERT(req->ctlr, q_type);
252 /* Remove and return the request at the head of the given queue (q_type). */
254 tw_osli_req_q_remove_head(struct twa_softc *sc, TW_UINT8 q_type)
260 if ((link = TW_CL_Q_FIRST_ITEM(&(sc->req_q_head[q_type]))) !=
264 TW_CL_Q_REMOVE_ITEM(&(sc->req_q_head[q_type]), &(req->link));
265 TW_OSLI_Q_REMOVE(sc, q_type);
273 /* Remove the given request from the given queue (q_type). */
275 tw_osli_req_q_remove_item(struct tw_osli_req_context *req, TW_UINT8 q_type)
278 TW_CL_Q_REMOVE_ITEM(&(req->ctlr->req_q_head[q_type]), &(req->link));
279 TW_OSLI_Q_REMOVE(req->ctlr, q_type);