require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_NET_NETISR_H_)) {
    eval 'sub _NET_NETISR_H_ () {1;}' unless defined(&_NET_NETISR_H_);
    eval 'sub NETISR_RND_DONE () {1;}' unless defined(&NETISR_RND_DONE);
    eval 'sub NETISR_IP () {2;}' unless defined(&NETISR_IP);
    eval 'sub NETISR_TX () {3;}' unless defined(&NETISR_TX);
    eval 'sub NETISR_MPLS () {4;}' unless defined(&NETISR_MPLS);
    eval 'sub NETISR_PFSYNC () {5;}' unless defined(&NETISR_PFSYNC);
    eval 'sub NETISR_ATALK () {16;}' unless defined(&NETISR_ATALK);
    eval 'sub NETISR_ARP () {18;}' unless defined(&NETISR_ARP);
    eval 'sub NETISR_IPV6 () {24;}' unless defined(&NETISR_IPV6);
    eval 'sub NETISR_ISDN () {26;}' unless defined(&NETISR_ISDN);
    eval 'sub NETISR_NATM () {27;}' unless defined(&NETISR_NATM);
    eval 'sub NETISR_PPP () {28;}' unless defined(&NETISR_PPP);
    eval 'sub NETISR_BRIDGE () {29;}' unless defined(&NETISR_BRIDGE);
    eval 'sub NETISR_PPPOE () {30;}' unless defined(&NETISR_PPPOE);
    eval 'sub NETISR_BT () {31;}' unless defined(&NETISR_BT);
    unless(defined(&_LOCORE)) {
	if(defined(&_KERNEL)) {
	    require 'machine/atomic.ph';
	    eval 'sub schednetisr {
	        my($anisr) = @_;
    		eval q( &do {  &atomic_setbits_int( &netisr, (1<< ($anisr)));  &setsoftnet(); }  &while (0));
	    }' unless defined(&schednetisr);
	}
    }
}
1;
