config root man

Current Path : /usr/local/lib/perl5/site_perl/5.8.9/mach/machine/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //usr/local/lib/perl5/site_perl/5.8.9/mach/machine/atomic.ph

require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_MACHINE_ATOMIC_H_)) {
    eval 'sub _MACHINE_ATOMIC_H_ () {1;}' unless defined(&_MACHINE_ATOMIC_H_);
    unless(defined(&_SYS_CDEFS_H_)) {
	die("this\ file\ needs\ sys\/cdefs\.h\ as\ a\ prerequisite");
    }
    eval 'sub mb () {
        eval q( &__asm  &__volatile(\\"mfence;\\" : : : \\"memory\\"));
    }' unless defined(&mb);
    eval 'sub wmb () {
        eval q( &__asm  &__volatile(\\"sfence;\\" : : : \\"memory\\"));
    }' unless defined(&wmb);
    eval 'sub rmb () {
        eval q( &__asm  &__volatile(\\"lfence;\\" : : : \\"memory\\"));
    }' unless defined(&rmb);
    if(defined( &KLD_MODULE) || !defined( &__GNUCLIKE_ASM)) {
	eval 'sub ATOMIC_ASM {
	    my($NAME, $TYPE, $OP, $CONS, $V) = @_;
    	    eval q( &void  &atomic_$NAME &_$TYPE( &volatile  &u_$TYPE * &p,  &u_$TYPE  &v);  &void  &atomic_$NAME &_barr_$TYPE( &volatile  &u_$TYPE * &p,  &u_$TYPE  &v));
	}' unless defined(&ATOMIC_ASM);
	eval 'sub ATOMIC_LOAD {
	    my($TYPE, $LOP) = @_;
    	    eval q( &u_$TYPE  &atomic_load_acq_$TYPE( &volatile  &u_$TYPE * &p));
	}' unless defined(&ATOMIC_LOAD);
	eval 'sub ATOMIC_STORE {
	    my($TYPE) = @_;
    	    eval q( &void  &atomic_store_rel_$TYPE( &volatile  &u_$TYPE * &p,  &u_$TYPE  &v));
	}' unless defined(&ATOMIC_STORE);
    } else {
	if(defined( &SMP) || !defined( &_KERNEL)) {
	    eval 'sub MPLOCKED () {"lock ; ";}' unless defined(&MPLOCKED);
	} else {
	    eval 'sub MPLOCKED () {1;}' unless defined(&MPLOCKED);
	}
	eval 'sub ATOMIC_ASM {
	    my($NAME, $TYPE, $OP, $CONS, $V) = @_;
    	    eval q( &static  &__inline  &void  &atomic_$NAME &_$TYPE( &volatile  &u_$TYPE * &p,  &u_$TYPE  &v){  &__asm  &__volatile( &MPLOCKED $OP : \\"=m\\" (* &p) : $CONS ($V), \\"m\\" (* &p) : \\"cc\\"); }  &static  &__inline  &void  &atomic_$NAME &_barr_$TYPE( &volatile  &u_$TYPE * &p,  &u_$TYPE  &v){  &__asm  &__volatile( &MPLOCKED $OP : \\"=m\\" (* &p) : $CONS ($V), \\"m\\" (* &p) : \\"memory\\", \\"cc\\"); } \'struct __hack\');
	}' unless defined(&ATOMIC_ASM);
	eval 'sub atomic_cmpset_long {
	    my($dst,$expect,$src) = @_;
    	    eval q({ \'u_char\'  &res;  &__asm  &__volatile( \\"	\\"  &MPLOCKED \\"		\\" \\"	cmpxchgq %2,%1 ;	\\" \\"       sete	%0 ;		\\" \\"1:				\\" \\"# atomic_cmpset_long\\" : \\"=a\\" ( &res), \\"=m\\" (*$dst) : \\"r\\" ($src), \\"a\\" ($expect), \\"m\\" (*$dst) : \\"memory\\", \\"cc\\"); ( &res); });
	}' unless defined(&atomic_cmpset_long);
	eval 'sub ATOMIC_STORE {
	    my($TYPE) = @_;
    	    eval q( &static  &__inline  &void  &atomic_store_rel_$TYPE( &volatile  &u_$TYPE * &p,  &u_$TYPE  &v){  &__asm  &__volatile(\\"\\" : : : \\"memory\\"); * &p =  &v; } \'struct __hack\');
	}' unless defined(&ATOMIC_STORE);
	if(defined( &_KERNEL)  && !defined( &SMP)) {
	    eval 'sub ATOMIC_LOAD {
	        my($TYPE, $LOP) = @_;
    		eval q( &static  &__inline  &u_$TYPE  &atomic_load_acq_$TYPE( &volatile  &u_$TYPE * &p) {  &u_$TYPE  &tmp;  &tmp = * &p;  &__asm  &__volatile(\\"\\" : : : \\"memory\\");  &return ( &tmp); } \'struct __hack\');
	    }' unless defined(&ATOMIC_LOAD);
	} else {
	    eval 'sub ATOMIC_LOAD {
	        my($TYPE, $LOP) = @_;
    		eval q( &static  &__inline  &u_$TYPE  &atomic_load_acq_$TYPE( &volatile  &u_$TYPE * &p) {  &u_$TYPE  &res;  &__asm  &__volatile( &MPLOCKED $LOP : \\"=a\\" ( &res), \\"=m\\" (* &p) : \\"m\\" (* &p) : \\"memory\\", \\"cc\\");  &return ( &res); } \'struct __hack\');
	    }' unless defined(&ATOMIC_LOAD);
	}
    }
    undef(&ATOMIC_ASM) if defined(&ATOMIC_ASM);
    undef(&ATOMIC_LOAD) if defined(&ATOMIC_LOAD);
    undef(&ATOMIC_STORE) if defined(&ATOMIC_STORE);
    unless(defined(&WANT_FUNCTIONS)) {
	if(defined(&__GNUCLIKE_ASM)) {
	    eval 'sub atomic_readandclear_int {
	        my($addr) = @_;
    		eval q({ \'u_int\'  &res;  &res = 0;  &__asm  &__volatile( \\"	xchgl	%1,%0 ;		\\" \\"# atomic_readandclear_int\\" : \\"+r\\" ( &res), \\"=m\\" (*$addr) : \\"m\\" (*$addr)); ( &res); });
	    }' unless defined(&atomic_readandclear_int);
	    eval 'sub atomic_readandclear_long {
	        my($addr) = @_;
    		eval q({ my $res;  $res = 0;  &__asm  &__volatile( \\"	xchgq	%1,%0 ;		\\" \\"# atomic_readandclear_long\\" : \\"+r\\" ( $res), \\"=m\\" (*$addr) : \\"m\\" (*$addr)); ( $res); });
	    }' unless defined(&atomic_readandclear_long);
	} else {
	}
	eval 'sub atomic_set_acq_char () { &atomic_set_barr_char;}' unless defined(&atomic_set_acq_char);
	eval 'sub atomic_set_rel_char () { &atomic_set_barr_char;}' unless defined(&atomic_set_rel_char);
	eval 'sub atomic_clear_acq_char () { &atomic_clear_barr_char;}' unless defined(&atomic_clear_acq_char);
	eval 'sub atomic_clear_rel_char () { &atomic_clear_barr_char;}' unless defined(&atomic_clear_rel_char);
	eval 'sub atomic_add_acq_char () { &atomic_add_barr_char;}' unless defined(&atomic_add_acq_char);
	eval 'sub atomic_add_rel_char () { &atomic_add_barr_char;}' unless defined(&atomic_add_rel_char);
	eval 'sub atomic_subtract_acq_char () { &atomic_subtract_barr_char;}' unless defined(&atomic_subtract_acq_char);
	eval 'sub atomic_subtract_rel_char () { &atomic_subtract_barr_char;}' unless defined(&atomic_subtract_rel_char);
	eval 'sub atomic_set_acq_short () {\'atomic_set_barr_short\';}' unless defined(&atomic_set_acq_short);
	eval 'sub atomic_set_rel_short () {\'atomic_set_barr_short\';}' unless defined(&atomic_set_rel_short);
	eval 'sub atomic_clear_acq_short () {\'atomic_clear_barr_short\';}' unless defined(&atomic_clear_acq_short);
	eval 'sub atomic_clear_rel_short () {\'atomic_clear_barr_short\';}' unless defined(&atomic_clear_rel_short);
	eval 'sub atomic_add_acq_short () {\'atomic_add_barr_short\';}' unless defined(&atomic_add_acq_short);
	eval 'sub atomic_add_rel_short () {\'atomic_add_barr_short\';}' unless defined(&atomic_add_rel_short);
	eval 'sub atomic_subtract_acq_short () {\'atomic_subtract_barr_short\';}' unless defined(&atomic_subtract_acq_short);
	eval 'sub atomic_subtract_rel_short () {\'atomic_subtract_barr_short\';}' unless defined(&atomic_subtract_rel_short);
	eval 'sub atomic_set_acq_int () { &atomic_set_barr_int;}' unless defined(&atomic_set_acq_int);
	eval 'sub atomic_set_rel_int () { &atomic_set_barr_int;}' unless defined(&atomic_set_rel_int);
	eval 'sub atomic_clear_acq_int () { &atomic_clear_barr_int;}' unless defined(&atomic_clear_acq_int);
	eval 'sub atomic_clear_rel_int () { &atomic_clear_barr_int;}' unless defined(&atomic_clear_rel_int);
	eval 'sub atomic_add_acq_int () { &atomic_add_barr_int;}' unless defined(&atomic_add_acq_int);
	eval 'sub atomic_add_rel_int () { &atomic_add_barr_int;}' unless defined(&atomic_add_rel_int);
	eval 'sub atomic_subtract_acq_int () { &atomic_subtract_barr_int;}' unless defined(&atomic_subtract_acq_int);
	eval 'sub atomic_subtract_rel_int () { &atomic_subtract_barr_int;}' unless defined(&atomic_subtract_rel_int);
	eval 'sub atomic_cmpset_acq_int () { &atomic_cmpset_int;}' unless defined(&atomic_cmpset_acq_int);
	eval 'sub atomic_cmpset_rel_int () { &atomic_cmpset_int;}' unless defined(&atomic_cmpset_rel_int);
	eval 'sub atomic_set_acq_long () {\'atomic_set_barr_long\';}' unless defined(&atomic_set_acq_long);
	eval 'sub atomic_set_rel_long () {\'atomic_set_barr_long\';}' unless defined(&atomic_set_rel_long);
	eval 'sub atomic_clear_acq_long () {\'atomic_clear_barr_long\';}' unless defined(&atomic_clear_acq_long);
	eval 'sub atomic_clear_rel_long () {\'atomic_clear_barr_long\';}' unless defined(&atomic_clear_rel_long);
	eval 'sub atomic_add_acq_long () {\'atomic_add_barr_long\';}' unless defined(&atomic_add_acq_long);
	eval 'sub atomic_add_rel_long () {\'atomic_add_barr_long\';}' unless defined(&atomic_add_rel_long);
	eval 'sub atomic_subtract_acq_long () {\'atomic_subtract_barr_long\';}' unless defined(&atomic_subtract_acq_long);
	eval 'sub atomic_subtract_rel_long () {\'atomic_subtract_barr_long\';}' unless defined(&atomic_subtract_rel_long);
	eval 'sub atomic_cmpset_acq_long () {\'atomic_cmpset_long\';}' unless defined(&atomic_cmpset_acq_long);
	eval 'sub atomic_cmpset_rel_long () {\'atomic_cmpset_long\';}' unless defined(&atomic_cmpset_rel_long);
	eval 'sub atomic_set_8 () { &atomic_set_char;}' unless defined(&atomic_set_8);
	eval 'sub atomic_set_acq_8 () { &atomic_set_acq_char;}' unless defined(&atomic_set_acq_8);
	eval 'sub atomic_set_rel_8 () { &atomic_set_rel_char;}' unless defined(&atomic_set_rel_8);
	eval 'sub atomic_clear_8 () { &atomic_clear_char;}' unless defined(&atomic_clear_8);
	eval 'sub atomic_clear_acq_8 () { &atomic_clear_acq_char;}' unless defined(&atomic_clear_acq_8);
	eval 'sub atomic_clear_rel_8 () { &atomic_clear_rel_char;}' unless defined(&atomic_clear_rel_8);
	eval 'sub atomic_add_8 () { &atomic_add_char;}' unless defined(&atomic_add_8);
	eval 'sub atomic_add_acq_8 () { &atomic_add_acq_char;}' unless defined(&atomic_add_acq_8);
	eval 'sub atomic_add_rel_8 () { &atomic_add_rel_char;}' unless defined(&atomic_add_rel_8);
	eval 'sub atomic_subtract_8 () { &atomic_subtract_char;}' unless defined(&atomic_subtract_8);
	eval 'sub atomic_subtract_acq_8 () { &atomic_subtract_acq_char;}' unless defined(&atomic_subtract_acq_8);
	eval 'sub atomic_subtract_rel_8 () { &atomic_subtract_rel_char;}' unless defined(&atomic_subtract_rel_8);
	eval 'sub atomic_load_acq_8 () { &atomic_load_acq_char;}' unless defined(&atomic_load_acq_8);
	eval 'sub atomic_store_rel_8 () { &atomic_store_rel_char;}' unless defined(&atomic_store_rel_8);
	eval 'sub atomic_set_16 () {\'atomic_set_short\';}' unless defined(&atomic_set_16);
	eval 'sub atomic_set_acq_16 () {\'atomic_set_acq_short\';}' unless defined(&atomic_set_acq_16);
	eval 'sub atomic_set_rel_16 () {\'atomic_set_rel_short\';}' unless defined(&atomic_set_rel_16);
	eval 'sub atomic_clear_16 () {\'atomic_clear_short\';}' unless defined(&atomic_clear_16);
	eval 'sub atomic_clear_acq_16 () {\'atomic_clear_acq_short\';}' unless defined(&atomic_clear_acq_16);
	eval 'sub atomic_clear_rel_16 () {\'atomic_clear_rel_short\';}' unless defined(&atomic_clear_rel_16);
	eval 'sub atomic_add_16 () {\'atomic_add_short\';}' unless defined(&atomic_add_16);
	eval 'sub atomic_add_acq_16 () {\'atomic_add_acq_short\';}' unless defined(&atomic_add_acq_16);
	eval 'sub atomic_add_rel_16 () {\'atomic_add_rel_short\';}' unless defined(&atomic_add_rel_16);
	eval 'sub atomic_subtract_16 () {\'atomic_subtract_short\';}' unless defined(&atomic_subtract_16);
	eval 'sub atomic_subtract_acq_16 () {\'atomic_subtract_acq_short\';}' unless defined(&atomic_subtract_acq_16);
	eval 'sub atomic_subtract_rel_16 () {\'atomic_subtract_rel_short\';}' unless defined(&atomic_subtract_rel_16);
	eval 'sub atomic_load_acq_16 () {\'atomic_load_acq_short\';}' unless defined(&atomic_load_acq_16);
	eval 'sub atomic_store_rel_16 () {\'atomic_store_rel_short\';}' unless defined(&atomic_store_rel_16);
	eval 'sub atomic_set_32 () { &atomic_set_int;}' unless defined(&atomic_set_32);
	eval 'sub atomic_set_acq_32 () { &atomic_set_acq_int;}' unless defined(&atomic_set_acq_32);
	eval 'sub atomic_set_rel_32 () { &atomic_set_rel_int;}' unless defined(&atomic_set_rel_32);
	eval 'sub atomic_clear_32 () { &atomic_clear_int;}' unless defined(&atomic_clear_32);
	eval 'sub atomic_clear_acq_32 () { &atomic_clear_acq_int;}' unless defined(&atomic_clear_acq_32);
	eval 'sub atomic_clear_rel_32 () { &atomic_clear_rel_int;}' unless defined(&atomic_clear_rel_32);
	eval 'sub atomic_add_32 () { &atomic_add_int;}' unless defined(&atomic_add_32);
	eval 'sub atomic_add_acq_32 () { &atomic_add_acq_int;}' unless defined(&atomic_add_acq_32);
	eval 'sub atomic_add_rel_32 () { &atomic_add_rel_int;}' unless defined(&atomic_add_rel_32);
	eval 'sub atomic_subtract_32 () { &atomic_subtract_int;}' unless defined(&atomic_subtract_32);
	eval 'sub atomic_subtract_acq_32 () { &atomic_subtract_acq_int;}' unless defined(&atomic_subtract_acq_32);
	eval 'sub atomic_subtract_rel_32 () { &atomic_subtract_rel_int;}' unless defined(&atomic_subtract_rel_32);
	eval 'sub atomic_load_acq_32 () { &atomic_load_acq_int;}' unless defined(&atomic_load_acq_32);
	eval 'sub atomic_store_rel_32 () { &atomic_store_rel_int;}' unless defined(&atomic_store_rel_32);
	eval 'sub atomic_cmpset_32 () { &atomic_cmpset_int;}' unless defined(&atomic_cmpset_32);
	eval 'sub atomic_cmpset_acq_32 () { &atomic_cmpset_acq_int;}' unless defined(&atomic_cmpset_acq_32);
	eval 'sub atomic_cmpset_rel_32 () { &atomic_cmpset_rel_int;}' unless defined(&atomic_cmpset_rel_32);
	eval 'sub atomic_readandclear_32 () { &atomic_readandclear_int;}' unless defined(&atomic_readandclear_32);
	eval 'sub atomic_fetchadd_32 () { &atomic_fetchadd_int;}' unless defined(&atomic_fetchadd_32);
	eval 'sub atomic_set_64 () {\'atomic_set_long\';}' unless defined(&atomic_set_64);
	eval 'sub atomic_set_acq_64 () {\'atomic_set_acq_long\';}' unless defined(&atomic_set_acq_64);
	eval 'sub atomic_set_rel_64 () {\'atomic_set_rel_long\';}' unless defined(&atomic_set_rel_64);
	eval 'sub atomic_clear_64 () {\'atomic_clear_long\';}' unless defined(&atomic_clear_64);
	eval 'sub atomic_clear_acq_64 () {\'atomic_clear_acq_long\';}' unless defined(&atomic_clear_acq_64);
	eval 'sub atomic_clear_rel_64 () {\'atomic_clear_rel_long\';}' unless defined(&atomic_clear_rel_64);
	eval 'sub atomic_add_64 () {\'atomic_add_long\';}' unless defined(&atomic_add_64);
	eval 'sub atomic_add_acq_64 () {\'atomic_add_acq_long\';}' unless defined(&atomic_add_acq_64);
	eval 'sub atomic_add_rel_64 () {\'atomic_add_rel_long\';}' unless defined(&atomic_add_rel_64);
	eval 'sub atomic_subtract_64 () {\'atomic_subtract_long\';}' unless defined(&atomic_subtract_64);
	eval 'sub atomic_subtract_acq_64 () {\'atomic_subtract_acq_long\';}' unless defined(&atomic_subtract_acq_64);
	eval 'sub atomic_subtract_rel_64 () {\'atomic_subtract_rel_long\';}' unless defined(&atomic_subtract_rel_64);
	eval 'sub atomic_load_acq_64 () {\'atomic_load_acq_long\';}' unless defined(&atomic_load_acq_64);
	eval 'sub atomic_store_rel_64 () {\'atomic_store_rel_long\';}' unless defined(&atomic_store_rel_64);
	eval 'sub atomic_cmpset_64 () {\'atomic_cmpset_long\';}' unless defined(&atomic_cmpset_64);
	eval 'sub atomic_cmpset_acq_64 () {\'atomic_cmpset_acq_long\';}' unless defined(&atomic_cmpset_acq_64);
	eval 'sub atomic_cmpset_rel_64 () {\'atomic_cmpset_rel_long\';}' unless defined(&atomic_cmpset_rel_64);
	eval 'sub atomic_readandclear_64 () {\'atomic_readandclear_long\';}' unless defined(&atomic_readandclear_64);
	eval 'sub atomic_set_ptr () {\'atomic_set_long\';}' unless defined(&atomic_set_ptr);
	eval 'sub atomic_set_acq_ptr () {\'atomic_set_acq_long\';}' unless defined(&atomic_set_acq_ptr);
	eval 'sub atomic_set_rel_ptr () {\'atomic_set_rel_long\';}' unless defined(&atomic_set_rel_ptr);
	eval 'sub atomic_clear_ptr () {\'atomic_clear_long\';}' unless defined(&atomic_clear_ptr);
	eval 'sub atomic_clear_acq_ptr () {\'atomic_clear_acq_long\';}' unless defined(&atomic_clear_acq_ptr);
	eval 'sub atomic_clear_rel_ptr () {\'atomic_clear_rel_long\';}' unless defined(&atomic_clear_rel_ptr);
	eval 'sub atomic_add_ptr () {\'atomic_add_long\';}' unless defined(&atomic_add_ptr);
	eval 'sub atomic_add_acq_ptr () {\'atomic_add_acq_long\';}' unless defined(&atomic_add_acq_ptr);
	eval 'sub atomic_add_rel_ptr () {\'atomic_add_rel_long\';}' unless defined(&atomic_add_rel_ptr);
	eval 'sub atomic_subtract_ptr () {\'atomic_subtract_long\';}' unless defined(&atomic_subtract_ptr);
	eval 'sub atomic_subtract_acq_ptr () {\'atomic_subtract_acq_long\';}' unless defined(&atomic_subtract_acq_ptr);
	eval 'sub atomic_subtract_rel_ptr () {\'atomic_subtract_rel_long\';}' unless defined(&atomic_subtract_rel_ptr);
	eval 'sub atomic_load_acq_ptr () {\'atomic_load_acq_long\';}' unless defined(&atomic_load_acq_ptr);
	eval 'sub atomic_store_rel_ptr () {\'atomic_store_rel_long\';}' unless defined(&atomic_store_rel_ptr);
	eval 'sub atomic_cmpset_ptr () {\'atomic_cmpset_long\';}' unless defined(&atomic_cmpset_ptr);
	eval 'sub atomic_cmpset_acq_ptr () {\'atomic_cmpset_acq_long\';}' unless defined(&atomic_cmpset_acq_ptr);
	eval 'sub atomic_cmpset_rel_ptr () {\'atomic_cmpset_rel_long\';}' unless defined(&atomic_cmpset_rel_ptr);
	eval 'sub atomic_readandclear_ptr () {\'atomic_readandclear_long\';}' unless defined(&atomic_readandclear_ptr);
    }
}
1;

Man Man