Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F111040960
D11534.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D11534.diff
View Options
Index: head/sys/compat/linuxkpi/common/include/linux/ktime.h
===================================================================
--- head/sys/compat/linuxkpi/common/include/linux/ktime.h
+++ head/sys/compat/linuxkpi/common/include/linux/ktime.h
@@ -26,8 +26,9 @@
*
* $FreeBSD$
*/
+
#ifndef _LINUX_KTIME_H
-#define _LINUX_KTIME_H
+#define _LINUX_KTIME_H
#include <linux/types.h>
#include <linux/time.h>
@@ -153,7 +154,7 @@
#define ktime_to_timeval(kt) ns_to_timeval((kt).tv64)
#define ktime_to_ns(kt) ((kt).tv64)
-static inline s64
+static inline int64_t
ktime_get_ns(void)
{
struct timespec ts;
@@ -164,6 +165,8 @@
return (ktime_to_ns(kt));
}
+#define ktime_get_raw_ns() ktime_get_ns()
+
static inline ktime_t
ktime_get(void)
{
@@ -173,4 +176,22 @@
return (timespec_to_ktime(ts));
}
-#endif /* _LINUX_KTIME_H */
+static inline ktime_t
+ktime_get_boottime(void)
+{
+ struct timespec ts;
+
+ nanouptime(&ts);
+ return (timespec_to_ktime(ts));
+}
+
+static inline ktime_t
+ktime_get_real(void)
+{
+ struct timespec ts;
+
+ nanotime(&ts);
+ return (timespec_to_ktime(ts));
+}
+
+#endif /* _LINUX_KTIME_H */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Feb 27, 2:27 PM (20 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16869970
Default Alt Text
D11534.diff (1 KB)
Attached To
Mode
D11534: Add some ktime functions.
Attached
Detach File
Event Timeline
Log In to Comment