Lines Matching defs:q_type

218 #define TW_CLI_Q_INIT(ctlr, q_type)	do {				\
219 (ctlr)->q_stats[q_type].cur_len = 0; \
220 (ctlr)->q_stats[q_type].max_len = 0; \
224 #define TW_CLI_Q_INSERT(ctlr, q_type) do { \
225 struct tw_cli_q_stats *q_stats = &((ctlr)->q_stats[q_type]); \
232 #define TW_CLI_Q_REMOVE(ctlr, q_type) \
233 (ctlr)->q_stats[q_type].cur_len--
246 tw_cli_req_q_init(struct tw_cli_ctlr_context *ctlr, TW_UINT8 q_type)
248 TW_CL_Q_INIT(&(ctlr->req_q_head[q_type]));
249 TW_CLI_Q_INIT(ctlr, q_type);
254 /* Insert the given request at the head of the given queue (q_type). */
256 tw_cli_req_q_insert_head(struct tw_cli_req_context *req, TW_UINT8 q_type)
261 TW_CL_Q_INSERT_HEAD(&(ctlr->req_q_head[q_type]), &(req->link));
262 TW_CLI_Q_INSERT(ctlr, q_type);
268 /* Insert the given request at the tail of the given queue (q_type). */
270 tw_cli_req_q_insert_tail(struct tw_cli_req_context *req, TW_UINT8 q_type)
275 TW_CL_Q_INSERT_TAIL(&(ctlr->req_q_head[q_type]), &(req->link));
276 TW_CLI_Q_INSERT(ctlr, q_type);
282 /* Remove and return the request at the head of the given queue (q_type). */
284 tw_cli_req_q_remove_head(struct tw_cli_ctlr_context *ctlr, TW_UINT8 q_type)
290 if ((link = TW_CL_Q_FIRST_ITEM(&(ctlr->req_q_head[q_type]))) !=
294 TW_CL_Q_REMOVE_ITEM(&(ctlr->req_q_head[q_type]), &(req->link));
295 TW_CLI_Q_REMOVE(ctlr, q_type);
303 /* Remove the given request from the given queue (q_type). */
305 tw_cli_req_q_remove_item(struct tw_cli_req_context *req, TW_UINT8 q_type)
310 TW_CL_Q_REMOVE_ITEM(&(ctlr->req_q_head[q_type]), &(req->link));
311 TW_CLI_Q_REMOVE(ctlr, q_type);