FreeBSD/sys/x86/xen/xen_intr.c
/**
 * Determine the event channel ports at the given section of the
 * event port bitmap which have pending events for the given cpu.
 * 
 * \param pcpu  The Xen interrupt pcpu data for the cpu being querried.
 * \param sh    The Xen shared info area.
 * \param idx   The index of the section of the event channel bitmap to
 *              inspect.
 *
 * \returns  A u_long with bits set for every event channel with pending
 *           events.
 */
Determine the event channel ports at the given section of the
event port bitmap which have pending events for the given cpu.

\param pcpu  The Xen interrupt pcpu data for the cpu being querried.
\param sh    The Xen shared info area.
\param idx   The index of the section of the event channel bitmap to
inspect.

\returns  A u_long with bits set for every event channel with pending
events.
Determine the event channel ports at the given section of the event port bitmap which have pending events for the given cpu . \ param pcpu The Xen interrupt pcpu data for the cpu being querried . \ param sh The Xen shared info area . \ param idx The index of the section of the event channel bitmap to inspect . \ returns A u_long with bits set for every event channel with pending events .
static inline u_long
xen_intr_active_ports(struct xen_intr_pcpu_data *pcpu, shared_info_t *sh,
    u_int idx)
{
	CTASSERT(sizeof(sh->evtchn_mask[0]) == sizeof(sh->evtchn_pending[0]));
	CTASSERT(sizeof(sh->evtchn_mask[0]) == sizeof(pcpu->evtchn_enabled[0]));
	CTASSERT(sizeof(sh->evtchn_mask) == sizeof(sh->evtchn_pending));
	CTASSERT(sizeof(sh->evtchn_mask) == sizeof(pcpu->evtchn_enabled));
	return (sh->evtchn_pending[idx]
	      & ~sh->evtchn_mask[idx]
	      & pcpu->evtchn_enabled[idx]);
}
static inline u_long xen_intr_active_ports ( struct xen_intr_pcpu_data * pcpu , shared_info_t * sh , u_int idx ) { CTASSERT ( sizeof ( sh -> evtchn_mask [ 0 ] ) == sizeof ( sh -> evtchn_pending [ 0 ] ) ) ; CTASSERT ( sizeof ( sh -> evtchn_mask [ 0 ] ) == sizeof ( pcpu -> evtchn_enabled [ 0 ] ) ) ; CTASSERT ( sizeof ( sh -> evtchn_mask ) == sizeof ( sh -> evtchn_pending ) ) ; CTASSERT ( sizeof ( sh -> evtchn_mask ) == sizeof ( pcpu -> evtchn_enabled ) ) ; return ( sh -> evtchn_pending [ idx ] & ~ sh -> evtchn_mask [ idx ] & pcpu -> evtchn_enabled [ idx ] ) ; }
Determine the event channel ports at the given section of the
 event port bitmap which have pending events for the given cpu.
Determine the event channel ports at the given section of the event port bitmap which have pending events for the given cpu .