FreeBSD/sys/dev/hyperv/vmbus/hv_channel.c
/**
 *  @brief Trigger an event notification on the specified channel
 */
@brief Trigger an event notification on the specified channel
@brief Trigger an event notification on the specified channel
static void
vmbus_channel_set_event(hv_vmbus_channel *channel)
{
	if (channel->offer_msg.monitor_allocated) {
		struct vmbus_softc *sc = vmbus_get_softc();
		hv_vmbus_monitor_page *monitor_page;
		uint32_t chanid = channel->offer_msg.child_rel_id;
		atomic_set_long(
		    &sc->vmbus_tx_evtflags[chanid >> VMBUS_EVTFLAG_SHIFT],
		    1UL << (chanid & VMBUS_EVTFLAG_MASK));
		monitor_page = sc->vmbus_mnf2;
		synch_set_bit(channel->monitor_bit,
			(uint32_t *)&monitor_page->
				trigger_group[channel->monitor_group].u.pending);
	} else {
		hv_vmbus_set_event(channel);
	}
}
static void vmbus_channel_set_event ( hv_vmbus_channel * channel ) { if ( channel -> offer_msg . monitor_allocated ) { struct vmbus_softc * sc = vmbus_get_softc ( ) ; hv_vmbus_monitor_page * monitor_page ; uint32_t chanid = channel -> offer_msg . child_rel_id ; atomic_set_long ( & sc -> vmbus_tx_evtflags [ chanid >> VMBUS_EVTFLAG_SHIFT ] , 1UL << ( chanid & VMBUS_EVTFLAG_MASK ) ) ; monitor_page = sc -> vmbus_mnf2 ; synch_set_bit ( channel -> monitor_bit , ( uint32_t * ) & monitor_page -> trigger_group [ channel -> monitor_group ] . u . pending ) ; } else { hv_vmbus_set_event ( channel ) ; } }
@brief Trigger an event notification on the specified channel
@brief Trigger an event notification on the specified channel