1
0
mirror of https://github.com/openbsd/src.git synced 2026-06-18 07:13:36 +02:00

add ktime_compare() for 6.18.34 drm

This commit is contained in:
jsg
2026-06-02 03:11:32 +00:00
parent 7614fb3f1c
commit 26a119b535
+11 -1
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: ktime.h,v 1.9 2026/06/02 03:04:53 jsg Exp $ */
/* $OpenBSD: ktime.h,v 1.10 2026/06/02 03:11:32 jsg Exp $ */
/*
* Copyright (c) 2013, 2014, 2015 Mark Kettenis
*
@@ -171,6 +171,16 @@ ktime_set(time_t s, long ns)
return TIMESPEC_TO_NSEC(&ts);
}
static inline int
ktime_compare(const ktime_t a, const ktime_t b)
{
if (a < b)
return -1;
if (a == b)
return 0;
return 1;
}
#include <linux/timekeeping.h>
#endif