require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_M88K_MUTEX_H_)) {
    eval 'sub _M88K_MUTEX_H_ () {1;}' unless defined(&_M88K_MUTEX_H_);
    eval 'sub MUTEX_INITIALIZER {
        my($ipl) = @_;
	    eval q({ 0, ($ipl),  &IPL_NONE,  &NULL });
    }' unless defined(&MUTEX_INITIALIZER);
    if(defined(&DIAGNOSTIC)) {
	eval 'sub MUTEX_ASSERT_LOCKED {
	    my($mtx) = @_;
    	    eval q( &do {  &if (($mtx)-> &mtx_lock == 0|| ($mtx)-> &mtx_cpu !=  &curcpu())  &panic(\\"mutex %p not held in %s\\", ($mtx),  &__func__); }  &while (0));
	}' unless defined(&MUTEX_ASSERT_LOCKED);
	eval 'sub MUTEX_ASSERT_UNLOCKED {
	    my($mtx) = @_;
    	    eval q( &do {  &if (($mtx)-> &mtx_lock != 0)  &panic(\\"mutex %p held in %s\\", ($mtx),  &__func__); }  &while (0));
	}' unless defined(&MUTEX_ASSERT_UNLOCKED);
    } else {
	eval 'sub MUTEX_ASSERT_LOCKED {
	    my($mtx) = @_;
    	    eval q( &do { }  &while (0));
	}' unless defined(&MUTEX_ASSERT_LOCKED);
	eval 'sub MUTEX_ASSERT_UNLOCKED {
	    my($mtx) = @_;
    	    eval q( &do { }  &while (0));
	}' unless defined(&MUTEX_ASSERT_UNLOCKED);
    }
    eval 'sub MUTEX_OLDIPL {
        my($mtx) = @_;
	    eval q(($mtx)-> &mtx_oldipl);
    }' unless defined(&MUTEX_OLDIPL);
}
1;
