diff options
author | Scott Soule Cheloha <cheloha@cvs.openbsd.org> | 2022-11-08 19:09:54 +0000 |
---|---|---|
committer | Scott Soule Cheloha <cheloha@cvs.openbsd.org> | 2022-11-08 19:09:54 +0000 |
commit | fc46855ea4ea47c6ba79b37d201f3d0c2b6bee7e (patch) | |
tree | b7617537b3d7f3e9e85b56b8aaa46066e9b163ed /sys | |
parent | eb2b80ca1a2dfe2e028f2679f7c810a301c60717 (diff) |
timeout(9): remove unused, undocumented timeout_in_nsec() interface
The kernel is not quite ready for timeout_in_nsec(). Remove it and
kclock_nanotime(). Both are unused.
Prompted by jsg@.
ok kn@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_timeout.c | 27 | ||||
-rw-r--r-- | sys/sys/timeout.h | 3 |
2 files changed, 2 insertions, 28 deletions
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index 199dd3357a9..44a4918db19 100644 --- a/sys/kern/kern_timeout.c +++ b/sys/kern/kern_timeout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_timeout.c,v 1.85 2021/06/19 02:05:33 cheloha Exp $ */ +/* $OpenBSD: kern_timeout.c,v 1.86 2022/11/08 19:09:53 cheloha Exp $ */ /* * Copyright (c) 2001 Thomas Nordin <nordin@openbsd.org> * Copyright (c) 2000-2001 Artur Grabowski <art@openbsd.org> @@ -166,7 +166,6 @@ struct lock_type timeout_spinlock_type = { ((needsproc) ? &timeout_sleeplock_obj : &timeout_spinlock_obj) #endif -void kclock_nanotime(int, struct timespec *); void softclock(void *); void softclock_create_thread(void *); void softclock_process_kclock_timeout(struct timeout *, int); @@ -431,30 +430,6 @@ timeout_at_ts(struct timeout *to, const struct timespec *abstime) } int -timeout_in_nsec(struct timeout *to, uint64_t nsecs) -{ - struct timespec abstime, interval, now; - - kclock_nanotime(to->to_kclock, &now); - NSEC_TO_TIMESPEC(nsecs, &interval); - timespecadd(&now, &interval, &abstime); - - return timeout_at_ts(to, &abstime); -} - -void -kclock_nanotime(int kclock, struct timespec *now) -{ - switch (kclock) { - case KCLOCK_UPTIME: - nanouptime(now); - break; - default: - panic("invalid kclock: 0x%x", kclock); - } -} - -int timeout_del(struct timeout *to) { int ret = 0; diff --git a/sys/sys/timeout.h b/sys/sys/timeout.h index 073756420a9..72874341f01 100644 --- a/sys/sys/timeout.h +++ b/sys/sys/timeout.h @@ -1,4 +1,4 @@ -/* $OpenBSD: timeout.h,v 1.43 2021/07/13 17:50:19 mvs Exp $ */ +/* $OpenBSD: timeout.h,v 1.44 2022/11/08 19:09:53 cheloha Exp $ */ /* * Copyright (c) 2000-2001 Artur Grabowski <art@openbsd.org> * All rights reserved. @@ -120,7 +120,6 @@ int timeout_add_usec(struct timeout *, int); int timeout_add_nsec(struct timeout *, int); int timeout_at_ts(struct timeout *, const struct timespec *); -int timeout_in_nsec(struct timeout *, uint64_t); int timeout_del(struct timeout *); int timeout_del_barrier(struct timeout *); |