FreeBSD/sys/dev/hyperv/utilities/hv_kvp.c
/*
 * This is the main kvp kernel process that interacts with both user daemon
 * and the host
 */
This is the main kvp kernel process that interacts with both user daemon
and the host
This is the main kvp kernel process that interacts with both user daemon and the host
static void
hv_kvp_send_msg_to_daemon(hv_kvp_sc *sc)
{
	struct hv_kvp_msg *hmsg = sc->host_kvp_msg;
	struct hv_kvp_msg *umsg = &sc->daemon_kvp_msg;
	hv_kvp_convert_hostmsg_to_usermsg(hmsg, umsg);
	sema_post(&sc->dev_sema);
	selwakeup(&sc->hv_kvp_selinfo);
}
static void hv_kvp_send_msg_to_daemon ( hv_kvp_sc * sc ) { struct hv_kvp_msg * hmsg = sc -> host_kvp_msg ; struct hv_kvp_msg * umsg = & sc -> daemon_kvp_msg ; hv_kvp_convert_hostmsg_to_usermsg ( hmsg , umsg ) ; sema_post ( & sc -> dev_sema ) ; selwakeup ( & sc -> hv_kvp_selinfo ) ; }
This is the main kvp kernel process that interacts with both user daemon
 and the host
This is the main kvp kernel process that interacts with both user daemon and the host
/* Prepare kvp_msg to be sent to user */ /* Send the msg to user via function deamon_read - setting sema */ /* We should wake up the daemon, in case it's doing poll() */