require '_h2ph_pre.ph';

unless(defined(&_UVM_UVM_H_)) {
    eval 'sub _UVM_UVM_H_ () {1;}' unless defined(&_UVM_UVM_H_);
    require 'uvm/uvm_extern.ph';
    require 'uvm/uvm_stat.ph';
    require 'uvm/uvm_amap.ph';
    require 'uvm/uvm_aobj.ph';
    require 'uvm/uvm_fault.ph';
    require 'uvm/uvm_glue.ph';
    require 'uvm/uvm_km.ph';
    require 'uvm/uvm_loan.ph';
    require 'uvm/uvm_map.ph';
    require 'uvm/uvm_object.ph';
    require 'uvm/uvm_page.ph';
    require 'uvm/uvm_pager.ph';
    require 'uvm/uvm_pdaemon.ph';
    require 'uvm/uvm_swap.ph';
    require 'machine/vmparam.ph';
    eval 'sub UVM_ET_OBJ () {0x01;}' unless defined(&UVM_ET_OBJ);
    eval 'sub UVM_ET_SUBMAP () {0x02;}' unless defined(&UVM_ET_SUBMAP);
    eval 'sub UVM_ET_COPYONWRITE () {0x04;}' unless defined(&UVM_ET_COPYONWRITE);
    eval 'sub UVM_ET_NEEDSCOPY () {0x08;}' unless defined(&UVM_ET_NEEDSCOPY);
    eval 'sub UVM_ET_ISOBJ {
        local($E) = @_;
	    eval q(((($E)-> &etype &  &UVM_ET_OBJ) != 0));
    }' unless defined(&UVM_ET_ISOBJ);
    eval 'sub UVM_ET_ISSUBMAP {
        local($E) = @_;
	    eval q(((($E)-> &etype &  &UVM_ET_SUBMAP) != 0));
    }' unless defined(&UVM_ET_ISSUBMAP);
    eval 'sub UVM_ET_ISCOPYONWRITE {
        local($E) = @_;
	    eval q(((($E)-> &etype &  &UVM_ET_COPYONWRITE) != 0));
    }' unless defined(&UVM_ET_ISCOPYONWRITE);
    eval 'sub UVM_ET_ISNEEDSCOPY {
        local($E) = @_;
	    eval q(((($E)-> &etype &  &UVM_ET_NEEDSCOPY) != 0));
    }' unless defined(&UVM_ET_ISNEEDSCOPY);
    if(defined( &MULTIPROCESSOR) || defined( &LOCKDEBUG)) {
	eval 'sub UVM_UNLOCK_AND_WAIT {
	    local($event,$lock,$intr,$msg, $timo) = @_;
    	    eval q( &thread_sleep_msg($event,$lock,$intr,$msg, $timo));
	}' unless defined(&UVM_UNLOCK_AND_WAIT);
    } else {
	eval 'sub UVM_UNLOCK_AND_WAIT {
	    local($event,$lock,$intr,$msg, $timo) = @_;
    	    eval q( &thread_sleep_msg($event, &NULL,$intr,$msg, $timo));
	}' unless defined(&UVM_UNLOCK_AND_WAIT);
    }
    if(defined( &UVM_PAGE_TRKOWN)) {
	eval 'sub UVM_PAGE_OWN {
	    local($PG, $TAG) = @_;
    	    eval q( &uvm_page_own($PG, $TAG));
	}' unless defined(&UVM_PAGE_OWN);
    } else {
	eval 'sub UVM_PAGE_OWN {
	    local($PG, $TAG) = @_;
    	    eval q();
	}' unless defined(&UVM_PAGE_OWN);
    }
    require 'uvm/uvm_amap_i.ph';
    require 'uvm/uvm_fault_i.ph';
    require 'uvm/uvm_map_i.ph';
    require 'uvm/uvm_page_i.ph';
    require 'uvm/uvm_pager_i.ph';
}
1;
