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

Function ttydev_read

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

Source from the content-addressed store, hash-verified

496}
497
498static int ttydev_read(struct lwp_tty *tp, struct uio *uio, int ioflag)
499{
500 int error;
501
502 error = ttydev_enter(tp);
503 if (error)
504 goto done;
505 error = ttydisc_read(tp, uio, ioflag);
506 tty_unlock(tp);
507
508 /*
509 * The read() call should not throw an error when the device is
510 * being destroyed. Silently convert it to an EOF.
511 */
512done:
513 if (error == -ENXIO)
514 error = 0;
515 return error;
516}
517
518static int ttydev_write(struct lwp_tty *tp, struct uio *uio, int ioflag)
519{

Callers

nothing calls this directly

Calls 2

ttydev_enterFunction · 0.85
ttydisc_readFunction · 0.85

Tested by

no test coverage detected