summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_timeout.c
diff options
context:
space:
mode:
authorart <art@openbsd.org>2000-03-23 11:07:33 +0000
committerart <art@openbsd.org>2000-03-23 11:07:33 +0000
commiteeca01e3c226be5e232c0fa35f0a20623254c745 (patch)
tree31db16c57682d57101ec7f14169e348004ef6e60 /sys/kern/kern_timeout.c
parentUse new timeouts for pfslowtimo and pffasttimo. (diff)
downloadwireguard-openbsd-eeca01e3c226be5e232c0fa35f0a20623254c745.tar.xz
wireguard-openbsd-eeca01e3c226be5e232c0fa35f0a20623254c745.zip
Provide methods to check if a timeout was initalized and if it is scheduled.
Diffstat (limited to 'sys/kern/kern_timeout.c')
-rw-r--r--sys/kern/kern_timeout.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c
index f6274b691e5..7ef15bb9f82 100644
--- a/sys/kern/kern_timeout.c
+++ b/sys/kern/kern_timeout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_timeout.c,v 1.2 2000/03/23 10:27:05 art Exp $ */
+/* $OpenBSD: kern_timeout.c,v 1.3 2000/03/23 11:07:34 art Exp $ */
/*
* Copyright (c) 2000 Artur Grabowski <art@openbsd.org>
* All rights reserved.
@@ -100,7 +100,7 @@ timeout_set(to, fn, arg)
to->to_func = fn;
to->to_arg = arg;
- to->to_flags = 0;
+ to->to_flags = TIMEOUT_INITIALIZED;
}
void
@@ -237,7 +237,7 @@ timeout(fn, arg, to_ticks)
timeout_list_unlock(s);
timeout_set(to, fn, arg);
- to->to_flags = TIMEOUT_STATIC;
+ to->to_flags |= TIMEOUT_STATIC;
timeout_add(to, to_ticks);
}