Lines Matching defs:q_type

189 #define TW_OSLI_Q_INIT(sc, q_type)	do {				\
190 (sc)->q_stats[q_type].cur_len = 0; \
191 (sc)->q_stats[q_type].max_len = 0; \
194 #define TW_OSLI_Q_INSERT(sc, q_type) do { \
195 struct tw_osli_q_stats *q_stats = &((sc)->q_stats[q_type]); \
201 #define TW_OSLI_Q_REMOVE(sc, q_type) \
202 (sc)->q_stats[q_type].cur_len--
214 tw_osli_req_q_init(struct twa_softc *sc, TW_UINT8 q_type)
216 TW_CL_Q_INIT(&(sc->req_q_head[q_type]));
217 TW_OSLI_Q_INIT(sc, q_type);
220 /* Insert the given request at the head of the given queue (q_type). */
222 tw_osli_req_q_insert_head(struct tw_osli_req_context *req, TW_UINT8 q_type)
225 TW_CL_Q_INSERT_HEAD(&(req->ctlr->req_q_head[q_type]), &(req->link));
226 TW_OSLI_Q_INSERT(req->ctlr, q_type);
230 /* Insert the given request at the tail of the given queue (q_type). */
232 tw_osli_req_q_insert_tail(struct tw_osli_req_context *req, TW_UINT8 q_type)
235 TW_CL_Q_INSERT_TAIL(&(req->ctlr->req_q_head[q_type]), &(req->link));
236 TW_OSLI_Q_INSERT(req->ctlr, q_type);
240 /* Remove and return the request at the head of the given queue (q_type). */
242 tw_osli_req_q_remove_head(struct twa_softc *sc, TW_UINT8 q_type)
248 if ((link = TW_CL_Q_FIRST_ITEM(&(sc->req_q_head[q_type]))) !=
252 TW_CL_Q_REMOVE_ITEM(&(sc->req_q_head[q_type]), &(req->link));
253 TW_OSLI_Q_REMOVE(sc, q_type);
259 /* Remove the given request from the given queue (q_type). */
261 tw_osli_req_q_remove_item(struct tw_osli_req_context *req, TW_UINT8 q_type)
264 TW_CL_Q_REMOVE_ITEM(&(req->ctlr->req_q_head[q_type]), &(req->link));
265 TW_OSLI_Q_REMOVE(req->ctlr, q_type);