/* At periodic intervals, scan through all active partitions and ensure their heartbeat is still active. If not, the partition is deactivated.  */
static void xpc_check_remote_hb(void)
/* At periodic intervals, scan through all active partitions and ensure their heartbeat is still active. If not, the partition is deactivated.  */
static void xpc_check_remote_hb(void)
{
	struct xpc_partition *part;
	short partid;
	enum xp_retval ret;
	for (partid = 0; partid < xp_max_npartitions; partid++) {
		if (xpc_exiting)
			break;
		if (partid == xp_partition_id)
			continue;
		part = &xpc_partitions[partid];
		if (part->act_state == XPC_P_AS_INACTIVE ||
		    part->act_state == XPC_P_AS_DEACTIVATING) {
			continue;
		}
		ret = xpc_arch_ops.get_remote_heartbeat(part);
		if (ret != xpSuccess)
			XPC_DEACTIVATE_PARTITION(part, ret);
	}
}