require '_h2ph_pre.ph';

unless(defined(&__irq_cpustat_h)) {
    eval 'sub __irq_cpustat_h () {1;}' unless defined(&__irq_cpustat_h);
    require 'linux/config.ph';
    if(defined(&CONFIG_SMP)) {
	eval 'sub __IRQ_STAT {
	    local($cpu, $member) = @_;
    	    eval q(( ($irq_stat[$cpu]->{member})));
	}' unless defined(&__IRQ_STAT);
    } else {
	eval 'sub __IRQ_STAT {
	    local($cpu, $member) = @_;
    	    eval q((($cpu),  ($irq_stat[0]->{member})));
	}' unless defined(&__IRQ_STAT);
    }
    eval 'sub softirq_pending {
        local($cpu) = @_;
	    eval q( &__IRQ_STAT(($cpu),  &__softirq_pending));
    }' unless defined(&softirq_pending);
    eval 'sub local_irq_count {
        local($cpu) = @_;
	    eval q( &__IRQ_STAT(($cpu),  &__local_irq_count));
    }' unless defined(&local_irq_count);
    eval 'sub local_bh_count {
        local($cpu) = @_;
	    eval q( &__IRQ_STAT(($cpu),  &__local_bh_count));
    }' unless defined(&local_bh_count);
    eval 'sub syscall_count {
        local($cpu) = @_;
	    eval q( &__IRQ_STAT(($cpu),  &__syscall_count));
    }' unless defined(&syscall_count);
    eval 'sub ksoftirqd_task {
        local($cpu) = @_;
	    eval q( &__IRQ_STAT(($cpu),  &__ksoftirqd_task));
    }' unless defined(&ksoftirqd_task);
    eval 'sub nmi_count {
        local($cpu) = @_;
	    eval q( &__IRQ_STAT(($cpu),  &__nmi_count));
    }' unless defined(&nmi_count);
}
1;
