require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_SYS_KSEM_H_)) {
    eval 'sub _SYS_KSEM_H_ () {1;}' unless defined(&_SYS_KSEM_H_);
    require 'sys/cdefs.ph';
    require 'sys/types.ph';
    if(defined(&_KERNEL)) {
	require 'sys/condvar.ph';
	require 'sys/mutex.ph';
	require 'sys/queue.ph';
	unless(defined(&_KMEMUSER)) {
	    require 'sys/systm.ph';
	}
	eval 'sub KSEM_MAX () {128;}' unless defined(&KSEM_MAX);
    }
    if(defined(&_KERNEL) || defined(&_LIBC)) {
	eval 'sub KSEM_PSHARED () {0x50535244;}' unless defined(&KSEM_PSHARED);
	eval 'sub KSEM_MARKER_MASK () {0xff000001;}' unless defined(&KSEM_MARKER_MASK);
	eval 'sub KSEM_MARKER_MIN () {0x1000001;}' unless defined(&KSEM_MARKER_MIN);
	eval 'sub KSEM_PSHARED_MARKER () {0x70000001;}' unless defined(&KSEM_PSHARED_MARKER);
    }
    if(defined(&_LIBC)) {
    }
}
1;
