diff options
author | cheloha <cheloha@cvs.openbsd.org> | 2020-01-03 01:16:13 +0000 |
---|---|---|
committer | cheloha <cheloha@cvs.openbsd.org> | 2020-01-03 01:16:13 +0000 |
commit | c1d20b9b045c80132d8eb9d5a7007af8faf2a00e (patch) | |
tree | 679861b2ac285efdc07dd094cd1cc6ea52e279b3 /sys | |
parent | 365b2b79812da02710b28ee1c0f8d6c3bb5746af (diff) |
timeout(9): Rename the TIMEOUT_NEEDPROCCTX flag to TIMEOUT_PROC.
This makes it more likely to fit into 80 columns if used alongside
the forthcoming timeout_set_flags() and TIMEOUT_INITIALIZER_FLAGS()
interfaces.
"makes sense to me" bluhm@, ok visa@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_timeout.c | 12 | ||||
-rw-r--r-- | sys/sys/timeout.h | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index 27d667ed0e1..293659ac7aa 100644 --- a/sys/kern/kern_timeout.c +++ b/sys/kern/kern_timeout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_timeout.c,v 1.67 2019/12/25 00:15:36 cheloha Exp $ */ +/* $OpenBSD: kern_timeout.c,v 1.68 2020/01/03 01:16:12 cheloha Exp $ */ /* * Copyright (c) 2001 Thomas Nordin <nordin@openbsd.org> * Copyright (c) 2000-2001 Artur Grabowski <art@openbsd.org> @@ -233,7 +233,7 @@ void timeout_set_proc(struct timeout *new, void (*fn)(void *), void *arg) { timeout_set(new, fn, arg); - SET(new->to_flags, TIMEOUT_NEEDPROCCTX); + SET(new->to_flags, TIMEOUT_PROC); } int @@ -389,7 +389,7 @@ timeout_del_barrier(struct timeout *to) { int removed; - timeout_sync_order(ISSET(to->to_flags, TIMEOUT_NEEDPROCCTX)); + timeout_sync_order(ISSET(to->to_flags, TIMEOUT_PROC)); removed = timeout_del(to); if (!removed) @@ -401,7 +401,7 @@ timeout_del_barrier(struct timeout *to) void timeout_barrier(struct timeout *to) { - int needsproc = ISSET(to->to_flags, TIMEOUT_NEEDPROCCTX); + int needsproc = ISSET(to->to_flags, TIMEOUT_PROC); timeout_sync_order(needsproc); @@ -476,7 +476,7 @@ timeout_run(struct timeout *to) fn = to->to_func; arg = to->to_arg; - needsproc = ISSET(to->to_flags, TIMEOUT_NEEDPROCCTX); + needsproc = ISSET(to->to_flags, TIMEOUT_PROC); mtx_leave(&timeout_mutex); timeout_sync_enter(needsproc); @@ -521,7 +521,7 @@ softclock(void *arg) } if (ISSET(to->to_flags, TIMEOUT_SCHEDULED) && delta < 0) tostat.tos_late++; - if (ISSET(to->to_flags, TIMEOUT_NEEDPROCCTX)) { + if (ISSET(to->to_flags, TIMEOUT_PROC)) { CIRCQ_INSERT_TAIL(&timeout_proc, &to->to_list); needsproc = 1; continue; diff --git a/sys/sys/timeout.h b/sys/sys/timeout.h index 8d78745f73a..88c0cb7c5e4 100644 --- a/sys/sys/timeout.h +++ b/sys/sys/timeout.h @@ -1,4 +1,4 @@ -/* $OpenBSD: timeout.h,v 1.34 2019/12/25 00:35:29 cheloha Exp $ */ +/* $OpenBSD: timeout.h,v 1.35 2020/01/03 01:16:12 cheloha Exp $ */ /* * Copyright (c) 2000-2001 Artur Grabowski <art@openbsd.org> * All rights reserved. @@ -67,7 +67,7 @@ struct timeout { /* * flags in the to_flags field. */ -#define TIMEOUT_NEEDPROCCTX 0x01 /* needs a process context */ +#define TIMEOUT_PROC 0x01 /* needs a process context */ #define TIMEOUT_ONQUEUE 0x02 /* on any timeout queue */ #define TIMEOUT_INITIALIZED 0x04 /* initialized */ #define TIMEOUT_TRIGGERED 0x08 /* running or ran */ |