diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2014-12-22 04:43:39 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2014-12-22 04:43:39 +0000 |
commit | 3a9e25fc873862839dd24b57eee62cd9ff21eb19 (patch) | |
tree | 946cebc89fc85516db7cde671fb9d3ad2c2fed34 /sys | |
parent | 4c3e2b03181a91c59b536d4cdec6f6f5d1cdf236 (diff) |
add TIMEOUT_INITIALIZER for initting timeout declaractions.
similar to TASK_INITIALIZER and all the queue _INITIALIZER things.
ok deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/sys/timeout.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/sys/timeout.h b/sys/sys/timeout.h index ddb7624c1c6..8f25af17e81 100644 --- a/sys/sys/timeout.h +++ b/sys/sys/timeout.h @@ -1,4 +1,4 @@ -/* $OpenBSD: timeout.h,v 1.24 2013/11/27 04:28:32 dlg Exp $ */ +/* $OpenBSD: timeout.h,v 1.25 2014/12/22 04:43:38 dlg Exp $ */ /* * Copyright (c) 2000-2001 Artur Grabowski <art@openbsd.org> * All rights reserved. @@ -82,6 +82,9 @@ struct timeout { #define timeout_initialized(to) ((to)->to_flags & TIMEOUT_INITIALIZED) #define timeout_triggered(to) ((to)->to_flags & TIMEOUT_TRIGGERED) +#define TIMEOUT_INITIALIZER(_f, _a) \ + { { NULL, NULL }, (_f), (_a), 0, TIMEOUT_INITIALIZED } + struct bintime; void timeout_set(struct timeout *, void (*)(void *), void *); |