Current Path : /usr/local/lib/perl5/site_perl/5.8.9/mach/sys/ |
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 |
Current File : //usr/local/lib/perl5/site_perl/5.8.9/mach/sys/refcount.ph |
require '_h2ph_pre.ph'; no warnings 'redefine'; unless(defined(&__SYS_REFCOUNT_H__)) { eval 'sub __SYS_REFCOUNT_H__ () {1;}' unless defined(&__SYS_REFCOUNT_H__); require 'machine/atomic.ph'; if(defined(&_KERNEL)) { require 'sys/systm.ph'; } else { eval 'sub KASSERT { my($exp, $msg) = @_; eval q(); }' unless defined(&KASSERT); } eval 'sub refcount_init { my($count,$value) = @_; eval q({ *$count = $value; }); }' unless defined(&refcount_init); eval 'sub refcount_acquire { my($count) = @_; eval q({ &atomic_add_acq_int($count, 1); }); }' unless defined(&refcount_acquire); eval 'sub refcount_release { my($count) = @_; eval q({ \'u_int\' &old; &old = &atomic_fetchadd_int($count, -1); &KASSERT( &old > 0, (\\"negative refcount %p\\", $count)); ( &old == 1); }); }' unless defined(&refcount_release); } 1;