require '_h2ph_pre.ph';

no warnings 'redefine';

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