Lines Matching refs:wb
682 #define inc_wb_pos(wb) \ argument
685 wb->pos = (wb->pos + 1) & (WB_HISTORY_SIZE - 1); \
686 wb->len = (wb->len + 1) > WB_HISTORY_SIZE ? WB_HISTORY_SIZE : \
687 wb->len + 1; \
692 static bool is_loop(struct match_workbuf *wb, aa_state_t state, in is_loop() argument
695 int pos = wb->pos; in is_loop()
698 if (wb->history[pos] < state) in is_loop()
701 for (i = 0; i < wb->len; i++) { in is_loop()
702 if (wb->history[pos] == state) { in is_loop()
714 const char *str, struct match_workbuf *wb, in leftmatch_fb() argument
725 AA_BUG(!wb); in leftmatch_fb()
740 wb->history[wb->pos] = state; in leftmatch_fb()
746 if (is_loop(wb, state, &adjust)) { in leftmatch_fb()
751 inc_wb_pos(wb); in leftmatch_fb()
759 wb->history[wb->pos] = state; in leftmatch_fb()
765 if (is_loop(wb, state, &adjust)) { in leftmatch_fb()
770 inc_wb_pos(wb); in leftmatch_fb()
797 DEFINE_MATCH_WB(wb); in aa_dfa_leftmatch()
801 return leftmatch_fb(dfa, start, str, &wb, count); in aa_dfa_leftmatch()