Lines Matching refs:tp
45 typedef int th_rint_t(struct tty *tp, char c, int flags);
46 typedef size_t th_rint_bypass_t(struct tty *tp, const void *buf, size_t len);
47 typedef void th_rint_done_t(struct tty *tp);
48 typedef size_t th_rint_poll_t(struct tty *tp);
50 typedef size_t th_getc_inject_t(struct tty *tp, void *buf, size_t len);
51 typedef void th_getc_capture_t(struct tty *tp, const void *buf, size_t len);
52 typedef size_t th_getc_poll_t(struct tty *tp);
54 typedef void th_close_t(struct tty *tp);
74 #define ttyhook_softc(tp) ((tp)->t_hooksoftc) argument
75 #define ttyhook_hashook(tp,hook) ((tp)->t_hook != NULL && \ argument
76 (tp)->t_hook->th_ ## hook != NULL)
79 ttyhook_rint(struct tty *tp, char c, int flags) in ttyhook_rint() argument
81 tty_assert_locked(tp); in ttyhook_rint()
82 MPASS(!tty_gone(tp)); in ttyhook_rint()
84 return tp->t_hook->th_rint(tp, c, flags); in ttyhook_rint()
88 ttyhook_rint_bypass(struct tty *tp, const void *buf, size_t len) in ttyhook_rint_bypass() argument
90 tty_assert_locked(tp); in ttyhook_rint_bypass()
91 MPASS(!tty_gone(tp)); in ttyhook_rint_bypass()
93 return tp->t_hook->th_rint_bypass(tp, buf, len); in ttyhook_rint_bypass()
97 ttyhook_rint_done(struct tty *tp) in ttyhook_rint_done() argument
99 tty_assert_locked(tp); in ttyhook_rint_done()
100 MPASS(!tty_gone(tp)); in ttyhook_rint_done()
102 tp->t_hook->th_rint_done(tp); in ttyhook_rint_done()
106 ttyhook_rint_poll(struct tty *tp) in ttyhook_rint_poll() argument
108 tty_assert_locked(tp); in ttyhook_rint_poll()
109 MPASS(!tty_gone(tp)); in ttyhook_rint_poll()
111 return tp->t_hook->th_rint_poll(tp); in ttyhook_rint_poll()
115 ttyhook_getc_inject(struct tty *tp, void *buf, size_t len) in ttyhook_getc_inject() argument
117 tty_assert_locked(tp); in ttyhook_getc_inject()
118 MPASS(!tty_gone(tp)); in ttyhook_getc_inject()
120 return tp->t_hook->th_getc_inject(tp, buf, len); in ttyhook_getc_inject()
124 ttyhook_getc_capture(struct tty *tp, const void *buf, size_t len) in ttyhook_getc_capture() argument
126 tty_assert_locked(tp); in ttyhook_getc_capture()
127 MPASS(!tty_gone(tp)); in ttyhook_getc_capture()
129 tp->t_hook->th_getc_capture(tp, buf, len); in ttyhook_getc_capture()
133 ttyhook_getc_poll(struct tty *tp) in ttyhook_getc_poll() argument
135 tty_assert_locked(tp); in ttyhook_getc_poll()
136 MPASS(!tty_gone(tp)); in ttyhook_getc_poll()
138 return tp->t_hook->th_getc_poll(tp); in ttyhook_getc_poll()
142 ttyhook_close(struct tty *tp) in ttyhook_close() argument
144 tty_assert_locked(tp); in ttyhook_close()
146 tp->t_hook->th_close(tp); in ttyhook_close()