003 File Manager
Current Path:
/usr/src/sys/compat/linuxkpi/common/include/linux
usr
/
src
/
sys
/
compat
/
linuxkpi
/
common
/
include
/
linux
/
π
..
π
acpi.h
(1.72 KB)
π
atomic.h
(1.5 KB)
π
backlight.h
(2.88 KB)
π
bitfield.h
(3.2 KB)
π
bitmap.h
(8.2 KB)
π
bitops.h
(9.41 KB)
π
bottom_half.h
(1.49 KB)
π
cache.h
(1.61 KB)
π
cdev.h
(3.77 KB)
π
clocksource.h
(1.63 KB)
π
compat.h
(2.07 KB)
π
compiler.h
(3.56 KB)
π
completion.h
(2.68 KB)
π
dcache.h
(1.64 KB)
π
debugfs.h
(1.96 KB)
π
delay.h
(2.25 KB)
π
device.h
(15.33 KB)
π
dma-attrs.h
(2.12 KB)
π
dma-mapping.h
(8.88 KB)
π
dmapool.h
(2.77 KB)
π
dmi.h
(2 KB)
π
err.h
(2.23 KB)
π
errno.h
(2.18 KB)
π
etherdevice.h
(2.91 KB)
π
export.h
(1.44 KB)
π
file.h
(4.46 KB)
π
firmware.h
(3.27 KB)
π
fs.h
(8.19 KB)
π
gcd.h
(1.7 KB)
π
gfp.h
(4.7 KB)
π
hardirq.h
(1.7 KB)
π
hrtimer.h
(3.04 KB)
π
idr.h
(4.61 KB)
π
if_arp.h
(1.62 KB)
π
if_ether.h
(2.12 KB)
π
if_vlan.h
(1.96 KB)
π
in.h
(1.87 KB)
π
in6.h
(1.54 KB)
π
inetdevice.h
(2.79 KB)
π
interrupt.h
(5.63 KB)
π
io-mapping.h
(3.05 KB)
π
io.h
(10.36 KB)
π
ioctl.h
(1.59 KB)
π
irq_work.h
(2.21 KB)
π
irqreturn.h
(1.56 KB)
π
jhash.h
(3.2 KB)
π
jiffies.h
(4.36 KB)
π
kdev_t.h
(1.76 KB)
π
kernel.h
(16.91 KB)
π
kmod.h
(1.89 KB)
π
kobject.h
(4.23 KB)
π
kref.h
(3.16 KB)
π
kthread.h
(2.84 KB)
π
ktime.h
(5.12 KB)
π
list.h
(12.2 KB)
π
llist.h
(2.25 KB)
π
lockdep.h
(2.99 KB)
π
log2.h
(3.96 KB)
π
math64.h
(2.7 KB)
π
miscdevice.h
(2.42 KB)
π
mm.h
(6.73 KB)
π
mm_types.h
(2.33 KB)
π
mod_devicetable.h
(2.25 KB)
π
module.h
(3.22 KB)
π
moduleparam.h
(5.26 KB)
π
mutex.h
(4.6 KB)
π
net.h
(2.42 KB)
π
net_dim.h
(9.87 KB)
π
netdevice.h
(3.85 KB)
π
notifier.h
(1.97 KB)
π
numa.h
(1.52 KB)
π
overflow.h
(2.13 KB)
π
page.h
(3.28 KB)
π
pagemap.h
(1.63 KB)
π
pci.h
(29.63 KB)
π
pfn.h
(1.75 KB)
π
pfn_t.h
(1.9 KB)
π
pid.h
(2.17 KB)
π
pm.h
(2.01 KB)
π
poll.h
(1.86 KB)
π
power_supply.h
(1.66 KB)
π
preempt.h
(1.69 KB)
π
prefetch.h
(1.55 KB)
π
printk.h
(4.08 KB)
π
radix-tree.h
(3.13 KB)
π
random.h
(2.04 KB)
π
rbtree.h
(3.37 KB)
π
rculist.h
(4.11 KB)
π
rcupdate.h
(3.66 KB)
π
refcount.h
(2.3 KB)
π
rwlock.h
(2.55 KB)
π
rwsem.h
(3.06 KB)
π
scatterlist.h
(12.58 KB)
π
sched.h
(5.91 KB)
π
semaphore.h
(2.36 KB)
π
seq_file.h
(3.03 KB)
π
shmem_fs.h
(2.26 KB)
π
shrinker.h
(2.04 KB)
π
sizes.h
(1.92 KB)
π
slab.h
(6.19 KB)
π
smp.h
(1.57 KB)
π
socket.h
(2.17 KB)
π
spinlock.h
(4.29 KB)
π
srcu.h
(2.02 KB)
π
string.h
(3.83 KB)
π
swap.h
(1.68 KB)
π
sysfs.h
(7.54 KB)
π
time.h
(3.17 KB)
π
timer.h
(3.21 KB)
π
types.h
(2.82 KB)
π
uaccess.h
(3.26 KB)
π
usb.h
(11.33 KB)
π
vmalloc.h
(1.72 KB)
π
wait.h
(9.41 KB)
π
wait_bit.h
(2.03 KB)
π
workqueue.h
(7.58 KB)
π
ww_mutex.h
(3.74 KB)
π
xarray.h
(3.33 KB)
Editing: time.h
/*- * Copyright (c) 2014-2015 FranΓ§ois Tigeot * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice unmodified, this list of conditions, and the following * disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _LINUX_TIME_H_ #define _LINUX_TIME_H_ #define NSEC_PER_USEC 1000L #define NSEC_PER_MSEC 1000000L #define NSEC_PER_SEC 1000000000L #define USEC_PER_MSEC 1000L #define USEC_PER_SEC 1000000L #define timespec64 timespec #include <sys/time.h> #include <sys/stdint.h> static inline struct timeval ns_to_timeval(const int64_t nsec) { struct timeval tv; long rem; if (nsec == 0) { tv.tv_sec = 0; tv.tv_usec = 0; return (tv); } tv.tv_sec = nsec / NSEC_PER_SEC; rem = nsec % NSEC_PER_SEC; if (rem < 0) { tv.tv_sec--; rem += NSEC_PER_SEC; } tv.tv_usec = rem / 1000; return (tv); } static inline int64_t timeval_to_ns(const struct timeval *tv) { return ((int64_t)tv->tv_sec * NSEC_PER_SEC) + tv->tv_usec * NSEC_PER_USEC; } #define getrawmonotonic(ts) nanouptime(ts) static inline struct timespec timespec_sub(struct timespec lhs, struct timespec rhs) { struct timespec ts; timespecsub(&lhs, &rhs, &ts); return ts; } static inline void set_normalized_timespec(struct timespec *ts, time_t sec, int64_t nsec) { /* XXX: this doesn't actually normalize anything */ ts->tv_sec = sec; ts->tv_nsec = nsec; } static inline int64_t timespec_to_ns(const struct timespec *ts) { return ((ts->tv_sec * NSEC_PER_SEC) + ts->tv_nsec); } static inline struct timespec ns_to_timespec(const int64_t nsec) { struct timespec ts; int32_t rem; if (nsec == 0) { ts.tv_sec = 0; ts.tv_nsec = 0; return (ts); } ts.tv_sec = nsec / NSEC_PER_SEC; rem = nsec % NSEC_PER_SEC; if (rem < 0) { ts.tv_sec--; rem += NSEC_PER_SEC; } ts.tv_nsec = rem; return (ts); } static inline int timespec_valid(const struct timespec *ts) { if (ts->tv_sec < 0 || ts->tv_sec > 100000000 || ts->tv_nsec < 0 || ts->tv_nsec >= 1000000000) return (0); return (1); } static inline unsigned long get_seconds(void) { return time_uptime; } #endif /* _LINUX_TIME_H_ */
Upload File
Create Folder