MCPcopy Create free account
hub / github.com/F-Stack/f-stack / tty_timedwait

Function tty_timedwait

freebsd/kern/tty.c:1569–1589  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1567}
1568
1569int
1570tty_timedwait(struct tty *tp, struct cv *cv, int hz)
1571{
1572 int error;
1573 int revokecnt = tp->t_revokecnt;
1574
1575 tty_lock_assert(tp, MA_OWNED|MA_NOTRECURSED);
1576 MPASS(!tty_gone(tp));
1577
1578 error = cv_timedwait_sig(cv, tp->t_mtx, hz);
1579
1580 /* Bail out when the device slipped away. */
1581 if (tty_gone(tp))
1582 return (ENXIO);
1583
1584 /* Restart the system call when we may have been revoked. */
1585 if (tp->t_revokecnt != revokecnt)
1586 return (ERESTART);
1587
1588 return (error);
1589}
1590
1591void
1592tty_flush(struct tty *tp, int flags)

Callers 2

tty_drainFunction · 0.85

Calls 1

cv_timedwait_sigFunction · 0.85

Tested by

no test coverage detected