Lines Matching refs:wb
673 #define inc_wb_pos(wb) \ argument
675 wb->pos = (wb->pos + 1) & (WB_HISTORY_SIZE - 1); \
676 wb->len = (wb->len + 1) & (WB_HISTORY_SIZE - 1); \
680 static bool is_loop(struct match_workbuf *wb, unsigned int state, in is_loop() argument
683 unsigned int pos = wb->pos; in is_loop()
686 if (wb->history[pos] < state) in is_loop()
689 for (i = 0; i <= wb->len; i++) { in is_loop()
690 if (wb->history[pos] == state) { in is_loop()
704 const char *str, struct match_workbuf *wb, in leftmatch_fb() argument
715 AA_BUG(!wb); in leftmatch_fb()
730 wb->history[wb->pos] = state; in leftmatch_fb()
736 if (is_loop(wb, state, &adjust)) { in leftmatch_fb()
741 inc_wb_pos(wb); in leftmatch_fb()
749 wb->history[wb->pos] = state; in leftmatch_fb()
755 if (is_loop(wb, state, &adjust)) { in leftmatch_fb()
760 inc_wb_pos(wb); in leftmatch_fb()
787 DEFINE_MATCH_WB(wb); in aa_dfa_leftmatch()
791 return leftmatch_fb(dfa, start, str, &wb, count); in aa_dfa_leftmatch()