Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/hyperv/hvsock/hv_sock.c
Show First 20 Lines • Show All 757 Lines • ▼ Show 20 Lines | if ((so->so_state & SS_NBIO) || | ||||
__func__, error); | __func__, error); | ||||
break; | break; | ||||
} | } | ||||
/* | /* | ||||
* Wait and block until (more) data comes in. | * Wait and block until (more) data comes in. | ||||
* Note: Drops the sockbuf lock during wait. | * Note: Drops the sockbuf lock during wait. | ||||
*/ | */ | ||||
error = sbwait(sb); | error = sbwait(so, SO_RCV); | ||||
if (error) | if (error) | ||||
break; | break; | ||||
HVSOCK_DBG(HVSOCK_DBG_VERBOSE, | HVSOCK_DBG(HVSOCK_DBG_VERBOSE, | ||||
"%s: wake up from sbwait, read available is %u\n", | "%s: wake up from sbwait, read available is %u\n", | ||||
__func__, vmbus_chan_read_available(pcb->chan)); | __func__, vmbus_chan_read_available(pcb->chan)); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 79 Lines • ▼ Show 20 Lines | if (canwrite == 0) { | ||||
} else { | } else { | ||||
/* | /* | ||||
* We are here because there is no space on | * We are here because there is no space on | ||||
* send buffer ring. Signal the other side | * send buffer ring. Signal the other side | ||||
* to read and free more space. | * to read and free more space. | ||||
* Sleep wait until space avaiable to send | * Sleep wait until space avaiable to send | ||||
* Note: Drops the sockbuf lock during wait. | * Note: Drops the sockbuf lock during wait. | ||||
*/ | */ | ||||
error = sbwait(sb); | error = sbwait(so, SO_SND); | ||||
if (error) | if (error) | ||||
break; | break; | ||||
HVSOCK_DBG(HVSOCK_DBG_VERBOSE, | HVSOCK_DBG(HVSOCK_DBG_VERBOSE, | ||||
"%s: wake up from sbwait, space avail on " | "%s: wake up from sbwait, space avail on " | ||||
"tx ring is %u\n", | "tx ring is %u\n", | ||||
__func__, | __func__, | ||||
▲ Show 20 Lines • Show All 888 Lines • Show Last 20 Lines |