MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / ttydev_enter

Function ttydev_enter

components/lwp/terminal/freebsd/tty.c:198–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196 */
197
198rt_inline int ttydev_enter(struct lwp_tty *tp)
199{
200 rt_err_t error = tty_lock(tp);
201 if (error)
202 RT_ASSERT(0);
203
204 if (tty_gone(tp) || !tty_opened(tp))
205 {
206 /* Device is already gone. */
207 tty_unlock(tp);
208 return -ENXIO;
209 }
210
211 return 0;
212}
213
214static void ttydev_leave(struct lwp_tty *tp)
215{

Callers 4

ttydev_readFunction · 0.85
ttydev_writeFunction · 0.85
ttydev_ioctlFunction · 0.85
ttydev_pollFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected