Lines 456-461
sbwait(struct socket *so, sb_which which)
Link Here
|
456 |
SOCK_BUF_LOCK_ASSERT(so, which); |
456 |
SOCK_BUF_LOCK_ASSERT(so, which); |
457 |
|
457 |
|
458 |
sb = sobuf(so, which); |
458 |
sb = sobuf(so, which); |
|
|
459 |
KASSERT((sb->sb_state & (SBS_CANTRCVMORE | SBS_CANTSENDMORE)) == 0, |
460 |
("sbwait: %s", (which == SO_RCV) ? "CANTRCVMORE" : "CANTSENDMORE")); |
459 |
sb->sb_flags |= SB_WAIT; |
461 |
sb->sb_flags |= SB_WAIT; |
460 |
return (msleep_sbt(&sb->sb_acc, soeventmtx(so, which), |
462 |
return (msleep_sbt(&sb->sb_acc, soeventmtx(so, which), |
461 |
(sb->sb_flags & SB_NOINTR) ? PSOCK : PSOCK | PCATCH, "sbwait", |
463 |
(sb->sb_flags & SB_NOINTR) ? PSOCK : PSOCK | PCATCH, "sbwait", |