003 File Manager
Current Path:
/usr/local/lib/perl5/site_perl/mach/5.32/sys
usr
/
local
/
lib
/
perl5
/
site_perl
/
mach
/
5.32
/
sys
/
📁
..
📄
_atomic64e.ph
(1.7 KB)
📄
_atomic_subword.ph
(5.32 KB)
📄
_bitset.ph
(834 B)
📄
_blockcount.ph
(809 B)
📄
_bus_dma.ph
(324 B)
📄
_callout.ph
(199 B)
📄
_cpuset.ph
(487 B)
📄
_cscan_atomic.ph
(29.03 KB)
📄
_cscan_bus.ph
(13.04 KB)
📄
_domainset.ph
(547 B)
📄
_eventhandler.ph
(738 B)
📄
_ffcounter.ph
(180 B)
📄
_iovec.ph
(316 B)
📄
_lock.ph
(1.19 KB)
📄
_lockmgr.ph
(276 B)
📄
_mutex.ph
(200 B)
📄
_null.ph
(651 B)
📄
_pctrie.ph
(171 B)
📄
_pthreadtypes.ph
(317 B)
📄
_rangeset.ph
(204 B)
📄
_rmlock.ph
(485 B)
📄
_rwlock.ph
(203 B)
📄
_semaphore.ph
(285 B)
📄
_seqc.ph
(165 B)
📄
_sigset.ph
(858 B)
📄
_smr.ph
(908 B)
📄
_sockaddr_storage.ph
(665 B)
📄
_stack.ph
(230 B)
📄
_stdarg.ph
(1.09 KB)
📄
_stdint.ph
(1.62 KB)
📄
_sx.ph
(159 B)
📄
_task.ph
(578 B)
📄
_termios.ph
(7.26 KB)
📄
_timespec.ph
(325 B)
📄
_timeval.ph
(456 B)
📄
_types.ph
(944 B)
📄
_ucontext.ph
(177 B)
📄
_uio.ph
(548 B)
📄
_umtx.ph
(265 B)
📄
_unrhdr.ph
(193 B)
📄
_winsize.ph
(174 B)
📄
aac_ioctl.ph
(7.36 KB)
📄
abi_compat.ph
(1.81 KB)
📄
acct.ph
(859 B)
📄
acl.ph
(6.91 KB)
📄
agpio.ph
(5.3 KB)
📄
aio.ph
(2.17 KB)
📄
alq.ph
(648 B)
📄
apm.ph
(87 B)
📄
arb.ph
(35.53 KB)
📄
assym.ph
(1.5 KB)
📄
ata.ph
(50.51 KB)
📄
atomic_common.ph
(3.28 KB)
📄
auxv.ph
(220 B)
📄
backlight.ph
(903 B)
📄
bio.ph
(2.23 KB)
📄
bitset.ph
(9.24 KB)
📄
bitstring.ph
(1.61 KB)
📄
blist.ph
(552 B)
📄
blockcount.ph
(1.6 KB)
📄
boot.ph
(247 B)
📄
buf.ph
(11.05 KB)
📄
buf_ring.ph
(1.55 KB)
📄
bufobj.ph
(2.18 KB)
📄
bus.ph
(24.54 KB)
📄
bus_dma.ph
(4.55 KB)
📄
bus_dma_internal.ph
(186 B)
📄
busdma_bufalloc.ph
(262 B)
📄
callout.ph
(5.06 KB)
📄
caprights.ph
(534 B)
📄
capsicum.ph
(12.44 KB)
📄
cdefs.ph
(33.03 KB)
📄
cdio.ph
(5.68 KB)
📄
cdrio.ph
(3.6 KB)
📄
cfictl.ph
(741 B)
📄
chio.ph
(6.57 KB)
📄
ck.ph
(503 B)
📄
clock.ph
(990 B)
📄
cnv.ph
(540 B)
📄
compressor.ph
(349 B)
📄
condvar.ph
(1.85 KB)
📄
conf.ph
(4.53 KB)
📄
cons.ph
(1.59 KB)
📄
consio.ph
(17.3 KB)
📄
copyright.ph
(608 B)
📄
counter.ph
(1.61 KB)
📄
coverage.ph
(745 B)
📄
cpu.ph
(2.36 KB)
📄
cpuctl.ph
(1.04 KB)
📄
cpuset.ph
(4.91 KB)
📄
csan.ph
(349 B)
📄
ctf.ph
(8.35 KB)
📄
ctf_api.ph
(1.04 KB)
📄
ctype.ph
(1.51 KB)
📄
devctl.ph
(168 B)
📄
devicestat.ph
(4.25 KB)
📄
devmap.ph
(352 B)
📄
dirent.ph
(1.88 KB)
📄
disk.ph
(2.75 KB)
📄
disk_zone.ph
(4.48 KB)
📄
disklabel.ph
(1.75 KB)
📄
diskmbr.ph
(329 B)
📄
dkstat.ph
(199 B)
📄
dnv.ph
(427 B)
📄
domain.ph
(1.16 KB)
📄
domainset.ph
(5.58 KB)
📄
dtrace.ph
(52.95 KB)
📄
dtrace_bsd.ph
(177 B)
📄
dvdio.ph
(2.61 KB)
📄
efi.ph
(3.33 KB)
📄
efiio.ph
(821 B)
📄
elf.ph
(273 B)
📄
elf32.ph
(1.41 KB)
📄
elf64.ph
(1.91 KB)
📄
elf_common.ph
(85.24 KB)
📄
elf_generic.ph
(2.06 KB)
📄
endian.ph
(5.87 KB)
📄
epoch.ph
(2.43 KB)
📄
errno.ph
(6.93 KB)
📄
eui64.ph
(323 B)
📄
event.ph
(7.54 KB)
📄
eventfd.ph
(458 B)
📄
eventhandler.ph
(4.88 KB)
📄
eventvar.ph
(858 B)
📄
exec.ph
(1.19 KB)
📄
extattr.ph
(1.12 KB)
📄
fail.ph
(5.77 KB)
📄
fbio.ph
(17.58 KB)
📄
fcntl.ph
(9.1 KB)
📄
fdcio.ph
(5.37 KB)
📄
file.ph
(6.54 KB)
📄
filedesc.ph
(6.85 KB)
📄
filio.ph
(1.99 KB)
📄
firmware.ph
(332 B)
📄
fnv_hash.ph
(1.52 KB)
📄
font.ph
(930 B)
📄
gmon.ph
(2.57 KB)
📄
gpio.ph
(3.4 KB)
📄
gpt.ph
(300 B)
📄
gsb_crc32.ph
(744 B)
📄
gtaskqueue.ph
(1.85 KB)
📄
hash.ph
(440 B)
📄
hhook.ph
(1.42 KB)
📄
iconv.ph
(4.33 KB)
📄
imgact.ph
(476 B)
📄
imgact_aout.ph
(4.63 KB)
📄
imgact_binmisc.ph
(1.75 KB)
📄
imgact_elf.ph
(1.45 KB)
📄
interrupt.ph
(1.45 KB)
📄
intr.ph
(1.61 KB)
📄
ioccom.ph
(2.62 KB)
📄
ioctl.ph
(387 B)
📄
ioctl_compat.ph
(5.35 KB)
📄
iov.ph
(1.34 KB)
📄
iov_schema.ph
(358 B)
📄
ipc.ph
(2.21 KB)
📄
ipmi.ph
(6.15 KB)
📄
jail.ph
(7.65 KB)
📄
joystick.ph
(819 B)
📄
kbio.ph
(8.69 KB)
📄
kcov.ph
(1.19 KB)
📄
kdb.ph
(2.3 KB)
📄
kenv.ph
(578 B)
📄
kern_prefetch.ph
(385 B)
📄
kernel.ph
(13.29 KB)
📄
kerneldump.ph
(3.28 KB)
📄
khelp.ph
(325 B)
📄
kobj.ph
(3.16 KB)
📄
kpilite.ph
(860 B)
📄
ksem.ph
(432 B)
📄
kthread.ph
(199 B)
📄
ktls.ph
(1.67 KB)
📄
ktr.ph
(12.26 KB)
📄
ktr_class.ph
(2.53 KB)
📄
ktrace.ph
(4.95 KB)
📄
libkern.ph
(3.61 KB)
📄
limits.ph
(2.99 KB)
📄
link_aout.ph
(4.54 KB)
📄
link_elf.ph
(971 B)
📄
linker.ph
(3.66 KB)
📄
linker_set.ph
(2.81 KB)
📄
lock.ph
(10.56 KB)
📄
lock_profile.ph
(1.31 KB)
📄
lockf.ph
(307 B)
📄
lockmgr.ph
(6.64 KB)
📄
lockstat.ph
(4.38 KB)
📄
loginclass.ph
(180 B)
📄
mac.ph
(740 B)
📄
malloc.ph
(3.64 KB)
📄
mbuf.ph
(33.44 KB)
📄
mchain.ph
(494 B)
📄
md4.ph
(213 B)
📄
md5.ph
(497 B)
📄
mdioctl.ph
(1.7 KB)
📄
memdesc.ph
(2.53 KB)
📄
memrange.ph
(1.99 KB)
📄
mman.ph
(9.09 KB)
📄
module.ph
(4.84 KB)
📄
module_khelp.ph
(1.18 KB)
📄
mount.ph
(22.18 KB)
📄
mouse.ph
(15.1 KB)
📄
mpt_ioctl.ph
(1.95 KB)
📄
mqueue.ph
(202 B)
📄
msg.ph
(1.24 KB)
📄
msgbuf.ph
(993 B)
📄
mtio.ph
(8.56 KB)
📄
mutex.ph
(17.47 KB)
📄
namei.ph
(7.81 KB)
📄
nlist_aout.ph
(1.88 KB)
📄
nv.ph
(2.02 KB)
📄
nvpair.ph
(4.36 KB)
📄
osd.ph
(3.22 KB)
📄
param.ph
(9.24 KB)
📄
pciio.ph
(2.92 KB)
📄
pcpu.ph
(6.97 KB)
📄
pctrie.ph
(2.74 KB)
📄
physmem.ph
(886 B)
📄
pidctrl.ph
(435 B)
📄
pipe.ph
(2.25 KB)
📄
pmc.ph
(22.72 KB)
📄
pmckern.ph
(6.13 KB)
📄
pmclog.ph
(3.2 KB)
📄
poll.ph
(1.58 KB)
📄
posix4.ph
(1.2 KB)
📄
power.ph
(986 B)
📄
priority.ph
(3.44 KB)
📄
priv.ph
(19.61 KB)
📄
prng.ph
(328 B)
📄
proc.ph
(30.83 KB)
📄
procctl.ph
(4.3 KB)
📄
procdesc.ph
(1.48 KB)
📄
procfs.ph
(535 B)
📄
protosw.ph
(4.83 KB)
📄
ptio.ph
(395 B)
📄
ptrace.ph
(4.63 KB)
📄
qmath.ph
(19.54 KB)
📄
queue.ph
(30.6 KB)
📄
racct.ph
(6.48 KB)
📄
random.ph
(4.47 KB)
📄
rangelock.ph
(1.45 KB)
📄
rangeset.ph
(234 B)
📄
rctl.ph
(4.19 KB)
📄
reboot.ph
(1.86 KB)
📄
refcount.ph
(4.03 KB)
📄
regression.ph
(218 B)
📄
resource.ph
(3.04 KB)
📄
resourcevar.ph
(1.14 KB)
📄
rman.ph
(1.89 KB)
📄
rmlock.ph
(4.18 KB)
📄
rtprio.ph
(1.44 KB)
📄
runq.ph
(296 B)
📄
rwlock.ph
(10.78 KB)
📄
sbuf.ph
(1.55 KB)
📄
sched.ph
(3.04 KB)
📄
sdt.ph
(21.91 KB)
📄
select.ph
(2.28 KB)
📄
selinfo.ph
(371 B)
📄
sem.ph
(1.97 KB)
📄
sema.ph
(919 B)
📄
seqc.ph
(2.19 KB)
📄
serial.ph
(2.12 KB)
📄
sf_buf.ph
(2.32 KB)
📄
sglist.ph
(715 B)
📄
shm.ph
(1.8 KB)
📄
sigio.ph
(323 B)
📄
signal.ph
(12.78 KB)
📄
signalvar.ph
(9.63 KB)
📄
sleepqueue.ph
(975 B)
📄
slicer.ph
(1000 B)
📄
smp.ph
(3.05 KB)
📄
smr.ph
(1.49 KB)
📄
smr_types.ph
(2.14 KB)
📄
snoop.ph
(625 B)
📄
sockbuf.ph
(4.14 KB)
📄
socket.ph
(20.01 KB)
📄
socketvar.ph
(7.29 KB)
📄
sockio.ph
(8.23 KB)
📄
sockopt.ph
(375 B)
📄
soundcard.ph
(66.67 KB)
📄
specialfd.ph
(257 B)
📄
spigenio.ph
(1.06 KB)
📄
stack.ph
(845 B)
📄
stat.ph
(9.2 KB)
📄
stats.ph
(30.3 KB)
📄
statvfs.ph
(485 B)
📄
stdatomic.ph
(15.26 KB)
📄
stddef.ph
(518 B)
📄
stdint.ph
(915 B)
📄
sx.ph
(10.75 KB)
📄
syscall.ph
(28.09 KB)
📄
syscallsubr.ph
(521 B)
📄
sysctl.ph
(46.96 KB)
📄
sysent.ph
(6.09 KB)
📄
syslimits.ph
(1.32 KB)
📄
syslog.ph
(4.03 KB)
📄
sysproto.ph
(43.73 KB)
📄
systm.ph
(12.58 KB)
📄
taskqueue.ph
(3.65 KB)
📄
terminal.ph
(5.68 KB)
📄
termios.ph
(223 B)
📄
thr.ph
(691 B)
📄
tiio.ph
(4.04 KB)
📄
tim_filter.ph
(540 B)
📄
time.ph
(12.88 KB)
📄
timeb.ph
(488 B)
📄
timeet.ph
(996 B)
📄
timeffc.ph
(3.86 KB)
📄
timepps.ph
(5.73 KB)
📄
timers.ph
(1.15 KB)
📄
times.ph
(379 B)
📄
timespec.ph
(735 B)
📄
timetc.ph
(444 B)
📄
timex.ph
(3.16 KB)
📄
tree.ph
(29.45 KB)
📄
tslog.ph
(2.24 KB)
📄
tty.ph
(3.84 KB)
📄
ttycom.ph
(5.65 KB)
📄
ttydefaults.ph
(2.62 KB)
📄
ttydevsw.ph
(2.84 KB)
📄
ttydisc.ph
(1.02 KB)
📄
ttyhook.ph
(2.25 KB)
📄
ttyqueue.ph
(2.15 KB)
📄
turnstile.ph
(357 B)
📄
types.ph
(7.97 KB)
📄
ucontext.ph
(695 B)
📄
ucred.ph
(1.19 KB)
📄
uio.ph
(681 B)
📄
umtx.ph
(6.12 KB)
📄
un.ph
(1.07 KB)
📄
unistd.ph
(7.59 KB)
📄
unpcb.ph
(1.19 KB)
📄
user.ph
(8.58 KB)
📄
utsname.ph
(553 B)
📄
uuid.ph
(543 B)
📄
vdso.ph
(1.28 KB)
📄
vmem.ph
(643 B)
📄
vmmeter.ph
(2.21 KB)
📄
vnode.ph
(24.18 KB)
📄
vtoc.ph
(88 B)
📄
wait.ph
(4.11 KB)
📄
watchdog.ph
(2.72 KB)
Editing: time.ph
require '_h2ph_pre.ph'; no warnings qw(redefine misc); unless(defined(&_SYS_TIME_H_)) { eval 'sub _SYS_TIME_H_ () {1;}' unless defined(&_SYS_TIME_H_); require 'sys/_timeval.ph'; require 'sys/types.ph'; require 'sys/timespec.ph'; eval 'sub DST_NONE () {0;}' unless defined(&DST_NONE); eval 'sub DST_USA () {1;}' unless defined(&DST_USA); eval 'sub DST_AUST () {2;}' unless defined(&DST_AUST); eval 'sub DST_WET () {3;}' unless defined(&DST_WET); eval 'sub DST_MET () {4;}' unless defined(&DST_MET); eval 'sub DST_EET () {5;}' unless defined(&DST_EET); eval 'sub DST_CAN () {6;}' unless defined(&DST_CAN); if((defined(&__BSD_VISIBLE) ? &__BSD_VISIBLE : undef)) { eval 'sub bintime_addx { my($_bt,$_x) = @_; eval q({ &uint64_t &_u; &_u = ($_bt->{frac}); ($_bt->{frac}) += $_x; &if ( &_u > ($_bt->{frac})) ($_bt->{sec})++; }); }' unless defined(&bintime_addx); eval 'sub bintime_add { my($_bt,$_bt2) = @_; eval q({ &uint64_t &_u; &_u = ($_bt->{frac}); ($_bt->{frac}) += ($_bt2->{frac}); &if ( &_u > ($_bt->{frac})) ($_bt->{sec})++; ($_bt->{sec}) += ($_bt2->{sec}); }); }' unless defined(&bintime_add); eval 'sub bintime_sub { my($_bt,$_bt2) = @_; eval q({ &uint64_t &_u; &_u = ($_bt->{frac}); ($_bt->{frac}) -= ($_bt2->{frac}); &if ( &_u < ($_bt->{frac})) ($_bt->{sec})--; ($_bt->{sec}) -= ($_bt2->{sec}); }); }' unless defined(&bintime_sub); eval 'sub bintime_mul { my($_bt,$_x) = @_; eval q({ &uint64_t &_p1, &_p2; &_p1 = ( ($_bt->{frac}) & 0xffffffff) * $_x; &_p2 = ( ($_bt->{frac}) >> 32) * $_x + ( &_p1 >> 32); ($_bt->{sec}) *= $_x; ($_bt->{sec}) += ( &_p2 >> 32); ($_bt->{frac}) = ( &_p2 << 32) | ( &_p1 & 0xffffffff); }); }' unless defined(&bintime_mul); eval 'sub bintime_shift { my($_bt,$_exp) = @_; eval q({ &if ($_exp > 0) { ($_bt->{sec}) <<= $_exp; ($_bt->{sec}) |= ($_bt->{frac}) >> (64- $_exp); ($_bt->{frac}) <<= $_exp; } &else &if ($_exp < 0) { ($_bt->{frac}) >>= -$_exp; ($_bt->{frac}) |= ( &uint64_t) ($_bt->{sec}) << (64+ $_exp); ($_bt->{sec}) >>= -$_exp; } }); }' unless defined(&bintime_shift); eval 'sub bintime_clear { my($a) = @_; eval q((($a)-> &sec = ($a)-> &frac = 0)); }' unless defined(&bintime_clear); eval 'sub bintime_isset { my($a) = @_; eval q((($a)-> &sec || ($a)-> &frac)); }' unless defined(&bintime_isset); eval 'sub bintime_cmp { my($a, $b, $cmp) = @_; eval q(((($a)-> &sec == ($b)-> &sec) ? (($a)-> &frac $cmp ($b)-> &frac) : (($a)-> &sec $cmp ($b)-> &sec))); }' unless defined(&bintime_cmp); eval 'sub SBT_1S () {(( &sbintime_t)1<< 32);}' unless defined(&SBT_1S); eval 'sub SBT_1M () {( &SBT_1S * 60);}' unless defined(&SBT_1M); eval 'sub SBT_1MS () {( &SBT_1S / 1000);}' unless defined(&SBT_1MS); eval 'sub SBT_1US () {( &SBT_1S / 1000000);}' unless defined(&SBT_1US); eval 'sub SBT_1NS () {( &SBT_1S / 1000000000);}' unless defined(&SBT_1NS); eval 'sub SBT_MAX () {0x7fffffffffffffff;}' unless defined(&SBT_MAX); eval 'sub sbintime_getsec { my($_sbt) = @_; eval q({ ($_sbt >> 32); }); }' unless defined(&sbintime_getsec); eval 'sub bttosbt { my($_bt) = @_; eval q({ ((( &sbintime_t) ($_bt->{sec}) << 32) + ( ($_bt->{frac}) >> 32)); }); }' unless defined(&bttosbt); eval 'sub sbttobt { my($_sbt) = @_; eval q({ \'struct bintime\' &_bt; ($_bt->{sec}) = $_sbt >> 32; ($_bt->{frac}) = $_sbt << 32; ( &_bt); }); }' unless defined(&sbttobt); if(defined(&KASSERT)) { } # some #ifdef were dropped here -- fill in the blanks eval 'sub nstosbt { my($_ns) = @_; eval q({ &sbintime_t &sb = 0; &if ($_ns >= &SBT_1S) { &sb = ($_ns / 1000000000) * &SBT_1S; $_ns = $_ns % 1000000000; } &sb += (($_ns * 9223372037) + 0x7fffffff) >> 31; ( &sb); }); }' unless defined(&nstosbt); eval 'sub sbttous { my($_sbt) = @_; eval q({ ((1000000* $_sbt) >> 32); }); }' unless defined(&sbttous); # some #ifdef were dropped here -- fill in the blanks eval 'sub ustosbt { my($_us) = @_; eval q({ &sbintime_t &sb = 0; &if ($_us >= &SBT_1S) { &sb = ($_us / 1000000) * &SBT_1S; $_us = $_us % 1000000; } &sb += (($_us * 9223372036855) + 0x7fffffff) >> 31; ( &sb); }); }' unless defined(&ustosbt); eval 'sub sbttoms { my($_sbt) = @_; eval q({ ((1000* $_sbt) >> 32); }); }' unless defined(&sbttoms); # some #ifdef were dropped here -- fill in the blanks eval 'sub mstosbt { my($_ms) = @_; eval q({ &sbintime_t &sb = 0; &if ($_ms >= &SBT_1S) { &sb = ($_ms / 1000) * &SBT_1S; $_ms = $_ms % 1000; } &sb += (($_ms * 9223372036854776) + 0x7fffffff) >> 31; ( &sb); }); }' unless defined(&mstosbt); eval 'sub timespec2bintime { my($_ts,$_bt) = @_; eval q({ ($_bt->{sec}) = ($_ts->{tv_sec}); ($_bt->{frac}) = ($_ts->{tv_nsec}) * ( &uint64_t)18446744073; }); }' unless defined(×pec2bintime); eval 'sub bintime2timeval { my($_bt,$_tv) = @_; eval q({ ($_tv->{tv_sec}) = ($_bt->{sec}); ($_tv->{tv_usec}) = (( &uint64_t)1000000* ( &uint32_t)( ($_bt->{frac}) >> 32)) >> 32; }); }' unless defined(&bintime2timeval); eval 'sub timeval2bintime { my($_tv,$_bt) = @_; eval q({ ($_bt->{sec}) = ($_tv->{tv_sec}); ($_bt->{frac}) = ($_tv->{tv_usec}) * ( &uint64_t)18446744073709; }); }' unless defined(&timeval2bintime); eval 'sub sbttots { my($_sbt) = @_; eval q({ \'struct timespec\' &_ts; ($_ts->{tv_sec}) = $_sbt >> 32; ($_ts->{tv_nsec}) = &sbttons(( &uint32_t)$_sbt); ( &_ts); }); }' unless defined(&sbttots); eval 'sub tstosbt { my($_ts) = @_; eval q({ ((( &sbintime_t) ($_ts->{tv_sec}) << 32) + &nstosbt( ($_ts->{tv_nsec}))); }); }' unless defined(&tstosbt); eval 'sub sbttotv { my($_sbt) = @_; eval q({ \'struct timeval\' &_tv; ($_tv->{tv_sec}) = $_sbt >> 32; ($_tv->{tv_usec}) = &sbttous(( &uint32_t)$_sbt); ( &_tv); }); }' unless defined(&sbttotv); eval 'sub tvtosbt { my($_tv) = @_; eval q({ ((( &sbintime_t) ($_tv->{tv_sec}) << 32) + &ustosbt( ($_tv->{tv_usec}))); }); }' unless defined(&tvtosbt); } if(defined(&_KERNEL)) { eval 'sub TICKS_2_MSEC { my($t) = @_; eval q( &max(1, ( &uint32_t)( &hz == 1000) ? ($t) : ((( &uint64_t)($t) * ( &uint64_t)1000)/( &uint64_t) &hz))); }' unless defined(&TICKS_2_MSEC); eval 'sub TICKS_2_USEC { my($t) = @_; eval q( &max(1, ( &uint32_t)( &hz == 1000) ? (($t) * 1000) : ((( &uint64_t)($t) * ( &uint64_t)1000000)/( &uint64_t) &hz))); }' unless defined(&TICKS_2_USEC); eval 'sub MSEC_2_TICKS { my($m) = @_; eval q( &max(1, ( &uint32_t)(( &hz == 1000) ? ($m) : (( &uint64_t)($m) * ( &uint64_t) &hz)/( &uint64_t)1000))); }' unless defined(&MSEC_2_TICKS); eval 'sub USEC_2_TICKS { my($u) = @_; eval q( &max(1, ( &uint32_t)(( &hz == 1000) ? (($u) / 1000) : (( &uint64_t)($u) * ( &uint64_t) &hz)/( &uint64_t)1000000))); }' unless defined(&USEC_2_TICKS); } eval 'sub timespecclear { my($tvp) = @_; eval q((($tvp)-> &tv_sec = ($tvp)-> &tv_nsec = 0)); }' unless defined(×pecclear); eval 'sub timespecisset { my($tvp) = @_; eval q((($tvp)-> &tv_sec || ($tvp)-> &tv_nsec)); }' unless defined(×pecisset); eval 'sub timespeccmp { my($tvp, $uvp, $cmp) = @_; eval q(((($tvp)-> &tv_sec == ($uvp)-> &tv_sec) ? (($tvp)-> &tv_nsec $cmp ($uvp)-> &tv_nsec) : (($tvp)-> &tv_sec $cmp ($uvp)-> &tv_sec))); }' unless defined(×peccmp); eval 'sub timespecadd { my($tsp, $usp, $vsp) = @_; eval q( &do { ($vsp)-> &tv_sec = ($tsp)-> &tv_sec + ($usp)-> &tv_sec; ($vsp)-> &tv_nsec = ($tsp)-> &tv_nsec + ($usp)-> &tv_nsec; &if (($vsp)-> &tv_nsec >= 1000000000) { ($vsp)-> &tv_sec++; ($vsp)-> &tv_nsec -= 1000000000; } } &while (0)); }' unless defined(×pecadd); eval 'sub timespecsub { my($tsp, $usp, $vsp) = @_; eval q( &do { ($vsp)-> &tv_sec = ($tsp)-> &tv_sec - ($usp)-> &tv_sec; ($vsp)-> &tv_nsec = ($tsp)-> &tv_nsec - ($usp)-> &tv_nsec; &if (($vsp)-> &tv_nsec < 0) { ($vsp)-> &tv_sec--; ($vsp)-> &tv_nsec += 1000000000; } } &while (0)); }' unless defined(×pecsub); if(defined(&_KERNEL)) { eval 'sub timevalclear { my($tvp) = @_; eval q((($tvp)-> &tv_sec = ($tvp)-> &tv_usec = 0)); }' unless defined(&timevalclear); eval 'sub timevalisset { my($tvp) = @_; eval q((($tvp)-> &tv_sec || ($tvp)-> &tv_usec)); }' unless defined(&timevalisset); eval 'sub timevalcmp { my($tvp, $uvp, $cmp) = @_; eval q(((($tvp)-> &tv_sec == ($uvp)-> &tv_sec) ? (($tvp)-> &tv_usec $cmp ($uvp)-> &tv_usec) : (($tvp)-> &tv_sec $cmp ($uvp)-> &tv_sec))); }' unless defined(&timevalcmp); } unless(defined(&_KERNEL)) { eval 'sub timerclear { my($tvp) = @_; eval q((($tvp)-> &tv_sec = ($tvp)-> &tv_usec = 0)); }' unless defined(&timerclear); eval 'sub timerisset { my($tvp) = @_; eval q((($tvp)-> &tv_sec || ($tvp)-> &tv_usec)); }' unless defined(&timerisset); eval 'sub timercmp { my($tvp, $uvp, $cmp) = @_; eval q(((($tvp)-> &tv_sec == ($uvp)-> &tv_sec) ? (($tvp)-> &tv_usec $cmp ($uvp)-> &tv_usec) : (($tvp)-> &tv_sec $cmp ($uvp)-> &tv_sec))); }' unless defined(&timercmp); eval 'sub timeradd { my($tvp, $uvp, $vvp) = @_; eval q( &do { ($vvp)-> &tv_sec = ($tvp)-> &tv_sec + ($uvp)-> &tv_sec; ($vvp)-> &tv_usec = ($tvp)-> &tv_usec + ($uvp)-> &tv_usec; &if (($vvp)-> &tv_usec >= 1000000) { ($vvp)-> &tv_sec++; ($vvp)-> &tv_usec -= 1000000; } } &while (0)); }' unless defined(&timeradd); eval 'sub timersub { my($tvp, $uvp, $vvp) = @_; eval q( &do { ($vvp)-> &tv_sec = ($tvp)-> &tv_sec - ($uvp)-> &tv_sec; ($vvp)-> &tv_usec = ($tvp)-> &tv_usec - ($uvp)-> &tv_usec; &if (($vvp)-> &tv_usec < 0) { ($vvp)-> &tv_sec--; ($vvp)-> &tv_usec += 1000000; } } &while (0)); }' unless defined(&timersub); } eval 'sub ITIMER_REAL () {0;}' unless defined(&ITIMER_REAL); eval 'sub ITIMER_VIRTUAL () {1;}' unless defined(&ITIMER_VIRTUAL); eval 'sub ITIMER_PROF () {2;}' unless defined(&ITIMER_PROF); unless(defined(&CLOCK_REALTIME)) { eval 'sub CLOCK_REALTIME () {0;}' unless defined(&CLOCK_REALTIME); } unless(defined(&CLOCK_VIRTUAL)) { eval 'sub CLOCK_VIRTUAL () {1;}' unless defined(&CLOCK_VIRTUAL); eval 'sub CLOCK_PROF () {2;}' unless defined(&CLOCK_PROF); } unless(defined(&CLOCK_MONOTONIC)) { eval 'sub CLOCK_MONOTONIC () {4;}' unless defined(&CLOCK_MONOTONIC); eval 'sub CLOCK_UPTIME () {5;}' unless defined(&CLOCK_UPTIME); eval 'sub CLOCK_UPTIME_PRECISE () {7;}' unless defined(&CLOCK_UPTIME_PRECISE); eval 'sub CLOCK_UPTIME_FAST () {8;}' unless defined(&CLOCK_UPTIME_FAST); eval 'sub CLOCK_REALTIME_PRECISE () {9;}' unless defined(&CLOCK_REALTIME_PRECISE); eval 'sub CLOCK_REALTIME_FAST () {10;}' unless defined(&CLOCK_REALTIME_FAST); eval 'sub CLOCK_MONOTONIC_PRECISE () {11;}' unless defined(&CLOCK_MONOTONIC_PRECISE); eval 'sub CLOCK_MONOTONIC_FAST () {12;}' unless defined(&CLOCK_MONOTONIC_FAST); eval 'sub CLOCK_SECOND () {13;}' unless defined(&CLOCK_SECOND); eval 'sub CLOCK_THREAD_CPUTIME_ID () {14;}' unless defined(&CLOCK_THREAD_CPUTIME_ID); eval 'sub CLOCK_PROCESS_CPUTIME_ID () {15;}' unless defined(&CLOCK_PROCESS_CPUTIME_ID); } unless(defined(&TIMER_ABSTIME)) { eval 'sub TIMER_RELTIME () {0x;}' unless defined(&TIMER_RELTIME); eval 'sub TIMER_ABSTIME () {0x1;}' unless defined(&TIMER_ABSTIME); } if((defined(&__BSD_VISIBLE) ? &__BSD_VISIBLE : undef)) { eval 'sub CPUCLOCK_WHICH_PID () {0;}' unless defined(&CPUCLOCK_WHICH_PID); eval 'sub CPUCLOCK_WHICH_TID () {1;}' unless defined(&CPUCLOCK_WHICH_TID); } if(defined(&_KERNEL) || defined(&_STANDALONE)) { eval 'sub sbinuptime { my($void) = @_; eval q({ \'struct bintime\' &_bt; &binuptime(& &_bt); ( &bttosbt( &_bt)); }); }' unless defined(&sbinuptime); eval 'sub getsbinuptime { my($void) = @_; eval q({ \'struct bintime\' &_bt; &getbinuptime(& &_bt); ( &bttosbt( &_bt)); }); }' unless defined(&getsbinuptime); eval 'sub TC_DEFAULTPERC () {5;}' unless defined(&TC_DEFAULTPERC); eval 'sub BT2FREQ { my($bt) = @_; eval q(((( &uint64_t)0x8000000000000000 + (($bt)-> &frac >> 2)) / (($bt)-> &frac >> 1))); }' unless defined(&BT2FREQ); eval 'sub SBT2FREQ { my($sbt) = @_; eval q((( &SBT_1S + (($sbt) >> 1)) / ($sbt))); }' unless defined(&SBT2FREQ); eval 'sub FREQ2BT { my($freq, $bt) = @_; eval q({ ($bt)-> &sec = 0; ($bt)-> &frac = (( &uint64_t)0x8000000000000000 / ($freq)) << 1; }); }' unless defined(&FREQ2BT); eval 'sub TIMESEL { my($sbt, $sbt2) = @_; eval q(((($sbt2) >= &sbt_timethreshold) ? ((*($sbt) = &getsbinuptime()), 1) : ((*($sbt) = &sbinuptime()), 0))); }' unless defined(&TIMESEL); } else { require 'time.ph'; require 'sys/cdefs.ph'; require 'sys/select.ph'; if((defined(&__BSD_VISIBLE) ? &__BSD_VISIBLE : undef)) { } if((defined(&__XSI_VISIBLE) ? &__XSI_VISIBLE : undef)) { } } } 1;
Upload File
Create Folder