summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Soule Cheloha <cheloha@cvs.openbsd.org>2022-12-31 16:06:25 +0000
committerScott Soule Cheloha <cheloha@cvs.openbsd.org>2022-12-31 16:06:25 +0000
commit1a77e55d797b35967d3c6afb16582c169fd0652b (patch)
tree05addfd5ea0573fe9fb58292477e5e6a56c872ca
parent4779407c605e29aae0957042a2e452f83cbfa65e (diff)
timeout: rename "timeout_at_ts" to "timeout_abs_ts"
I think "abs" ("absolute timeout") is a better mnemonic than "at" ("at the given time"). The interface is undocumented and there are only two callers, so renaming it is not a big deal. probably ok kn@
-rw-r--r--sys/kern/kern_time.c6
-rw-r--r--sys/kern/kern_timeout.c4
-rw-r--r--sys/sys/timeout.h4
3 files changed, 7 insertions, 7 deletions
diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c
index 8a274cc0fc8..a86e272a253 100644
--- a/sys/kern/kern_time.c
+++ b/sys/kern/kern_time.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_time.c,v 1.159 2022/12/05 23:18:37 deraadt Exp $ */
+/* $OpenBSD: kern_time.c,v 1.160 2022/12/31 16:06:24 cheloha Exp $ */
/* $NetBSD: kern_time.c,v 1.20 1996/02/18 11:57:06 fvdl Exp $ */
/*
@@ -548,7 +548,7 @@ setitimer(int which, const struct itimerval *itv, struct itimerval *olditv)
if (which == ITIMER_REAL) {
if (timespecisset(&its.it_value)) {
timespecadd(&its.it_value, &now, &its.it_value);
- timeout_at_ts(&pr->ps_realit_to, &its.it_value);
+ timeout_abs_ts(&pr->ps_realit_to,&its.it_value);
} else
timeout_del(&pr->ps_realit_to);
}
@@ -691,7 +691,7 @@ realitexpire(void *arg)
while (timespeccmp(&tp->it_value, &cts, <=))
timespecadd(&tp->it_value, &tp->it_interval, &tp->it_value);
if ((pr->ps_flags & PS_EXITING) == 0)
- timeout_at_ts(&pr->ps_realit_to, &tp->it_value);
+ timeout_abs_ts(&pr->ps_realit_to, &tp->it_value);
out:
mtx_leave(&pr->ps_mtx);
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c
index f1d5f723971..ef72572c36c 100644
--- a/sys/kern/kern_timeout.c
+++ b/sys/kern/kern_timeout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_timeout.c,v 1.89 2022/12/05 23:18:37 deraadt Exp $ */
+/* $OpenBSD: kern_timeout.c,v 1.90 2022/12/31 16:06:24 cheloha Exp $ */
/*
* Copyright (c) 2001 Thomas Nordin <nordin@openbsd.org>
* Copyright (c) 2000-2001 Artur Grabowski <art@openbsd.org>
@@ -380,7 +380,7 @@ timeout_add_nsec(struct timeout *to, int nsecs)
}
int
-timeout_at_ts(struct timeout *to, const struct timespec *abstime)
+timeout_abs_ts(struct timeout *to, const struct timespec *abstime)
{
struct timespec old_abstime;
int ret = 1;
diff --git a/sys/sys/timeout.h b/sys/sys/timeout.h
index bdb437c4c70..56fb0dde9eb 100644
--- a/sys/sys/timeout.h
+++ b/sys/sys/timeout.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: timeout.h,v 1.46 2022/11/11 18:09:58 cheloha Exp $ */
+/* $OpenBSD: timeout.h,v 1.47 2022/12/31 16:06:24 cheloha Exp $ */
/*
* Copyright (c) 2000-2001 Artur Grabowski <art@openbsd.org>
* All rights reserved.
@@ -111,7 +111,7 @@ int timeout_add_msec(struct timeout *, int);
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_abs_ts(struct timeout *, const struct timespec *);
int timeout_del(struct timeout *);
int timeout_del_barrier(struct timeout *);