diff options
author | 2020-08-03 07:02:08 +0000 | |
---|---|---|
committer | 2020-08-03 07:02:08 +0000 | |
commit | d0e09f6751df9efcb9e2d8d3f2b95efab8aeca2d (patch) | |
tree | 2d3552cfd222f449062ebe953d95a8ba677edf81 /sys | |
parent | put the descriptions of the different list types under subsection headings. (diff) | |
download | wireguard-openbsd-d0e09f6751df9efcb9e2d8d3f2b95efab8aeca2d.tar.xz wireguard-openbsd-d0e09f6751df9efcb9e2d8d3f2b95efab8aeca2d.zip |
remove timeval conversion interfaces no longer in linux
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/drm_linux.c | 43 | ||||
-rw-r--r-- | sys/dev/pci/drm/include/linux/time.h | 7 |
2 files changed, 2 insertions, 48 deletions
diff --git a/sys/dev/pci/drm/drm_linux.c b/sys/dev/pci/drm/drm_linux.c index 356b56aef5b..d0d6965a784 100644 --- a/sys/dev/pci/drm/drm_linux.c +++ b/sys/dev/pci/drm/drm_linux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: drm_linux.c,v 1.61 2020/07/02 11:01:21 jsg Exp $ */ +/* $OpenBSD: drm_linux.c,v 1.62 2020/08/03 07:02:08 jsg Exp $ */ /* * Copyright (c) 2013 Jonathan Gray <jsg@openbsd.org> * Copyright (c) 2015, 2016 Mark Kettenis <kettenis@openbsd.org> @@ -303,47 +303,6 @@ kthread_stop(struct proc *p) free(thread, M_DRM, sizeof(*thread)); } -int64_t -timeval_to_ns(const struct timeval *tv) -{ - return ((int64_t)tv->tv_sec * NSEC_PER_SEC) + - tv->tv_usec * NSEC_PER_USEC; -} - -struct timeval -ns_to_timeval(const int64_t nsec) -{ - struct timeval tv; - int32_t 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); -} - -int64_t -timeval_to_ms(const struct timeval *tv) -{ - return ((int64_t)tv->tv_sec * 1000) + (tv->tv_usec / 1000); -} - -int64_t -timeval_to_us(const struct timeval *tv) -{ - return ((int64_t)tv->tv_sec * 1000000) + tv->tv_usec; -} - extern char *hw_vendor, *hw_prod, *hw_ver; #if NBIOS > 0 diff --git a/sys/dev/pci/drm/include/linux/time.h b/sys/dev/pci/drm/include/linux/time.h index ec764e28a4a..fb9c3308617 100644 --- a/sys/dev/pci/drm/include/linux/time.h +++ b/sys/dev/pci/drm/include/linux/time.h @@ -1,4 +1,4 @@ -/* $OpenBSD: time.h,v 1.3 2020/07/02 11:01:21 jsg Exp $ */ +/* $OpenBSD: time.h,v 1.4 2020/08/03 07:02:08 jsg Exp $ */ /* * Copyright (c) 2013, 2014, 2015 Mark Kettenis * @@ -29,11 +29,6 @@ #define USEC_PER_MSEC 1000L #define USEC_PER_SEC 1000000L -extern int64_t timeval_to_ms(const struct timeval *); -extern int64_t timeval_to_ns(const struct timeval *); -extern int64_t timeval_to_us(const struct timeval *); -extern struct timeval ns_to_timeval(const int64_t); - struct timespec64 { time_t tv_sec; long tv_nsec; |