Lines Matching refs:parser
561 struct ff400_msg_parser *parser = ff->msg_parser; in ff400_has_msg() local
563 return (parser->push_pos != parser->pull_pos); in ff400_has_msg()
658 struct ff400_msg_parser *parser = ff->msg_parser; in ff400_handle_msg() local
660 parser->msgs[parser->push_pos].msg = quad; in ff400_handle_msg()
661 parser->msgs[parser->push_pos].tstamp = tstamp; in ff400_handle_msg()
662 ++parser->push_pos; in ff400_handle_msg()
663 if (parser->push_pos >= FF400_QUEUE_SIZE) in ff400_handle_msg()
664 parser->push_pos = 0; in ff400_handle_msg()
684 struct ff400_msg_parser *parser = ff->msg_parser; in ff400_copy_msg_to_user() local
688 if (count < sizeof(ev) || parser->pull_pos == parser->push_pos) in ff400_copy_msg_to_user()
694 while (count >= sizeof(*parser->msgs) && parser->pull_pos != parser->push_pos) { in ff400_copy_msg_to_user()
696 if (copy_to_user(buf + consumed, parser->msgs + parser->pull_pos, in ff400_copy_msg_to_user()
697 sizeof(*parser->msgs))) in ff400_copy_msg_to_user()
703 ++parser->pull_pos; in ff400_copy_msg_to_user()
704 if (parser->pull_pos >= FF400_QUEUE_SIZE) in ff400_copy_msg_to_user()
705 parser->pull_pos = 0; in ff400_copy_msg_to_user()
707 count -= sizeof(*parser->msgs); in ff400_copy_msg_to_user()
708 consumed += sizeof(*parser->msgs); in ff400_copy_msg_to_user()