summaryrefslogtreecommitdiffstats
path: root/sys/dev/kcov.c
diff options
context:
space:
mode:
authoranton <anton@openbsd.org>2020-06-07 19:23:33 +0000
committeranton <anton@openbsd.org>2020-06-07 19:23:33 +0000
commit7a9d832a303b580c3819dd7eecb9f29f3395919f (patch)
tree116d647a7b21f9fce527aecbae88a138477f7084 /sys/dev/kcov.c
parentAdd powerdown code. (diff)
downloadwireguard-openbsd-7a9d832a303b580c3819dd7eecb9f29f3395919f.tar.xz
wireguard-openbsd-7a9d832a303b580c3819dd7eecb9f29f3395919f.zip
Turn anonymous state enum into preprocessor defines, paves the way for
reuse.
Diffstat (limited to 'sys/dev/kcov.c')
-rw-r--r--sys/dev/kcov.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/kcov.c b/sys/dev/kcov.c
index 12d94dbca1e..9f6d16c827b 100644
--- a/sys/dev/kcov.c
+++ b/sys/dev/kcov.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kcov.c,v 1.19 2020/05/25 14:00:15 anton Exp $ */
+/* $OpenBSD: kcov.c,v 1.20 2020/06/07 19:23:33 anton Exp $ */
/*
* Copyright (c) 2018 Anton Lindqvist <anton@openbsd.org>
@@ -31,13 +31,13 @@
#define KCOV_CMP_CONST 0x1
#define KCOV_CMP_SIZE(x) ((x) << 1)
+#define KCOV_STATE_NONE 0
+#define KCOV_STATE_READY 1
+#define KCOV_STATE_TRACE 2
+#define KCOV_STATE_DYING 3
+
struct kcov_dev {
- enum {
- KCOV_STATE_NONE,
- KCOV_STATE_READY,
- KCOV_STATE_TRACE,
- KCOV_STATE_DYING,
- } kd_state;
+ int kd_state;
int kd_mode;
int kd_unit; /* device minor */
uintptr_t *kd_buf; /* traced coverage */