summaryrefslogtreecommitdiff
path: root/sys/dev/pv/xen.c
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2016-01-22 19:28:17 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2016-01-22 19:28:17 +0000
commitb7fef9e841acd7e80c0171b8c3384257d56b3b18 (patch)
tree64ff00ace162f2729ebdb9d84b4c0e836e7185b1 /sys/dev/pv/xen.c
parentb618754d18fc0d6d42ad83501316fa93478bee44 (diff)
To facilitate reading make sure to use a GTF_invalid flag by name
Diffstat (limited to 'sys/dev/pv/xen.c')
-rw-r--r--sys/dev/pv/xen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pv/xen.c b/sys/dev/pv/xen.c
index 44e83142687..cdb973817a7 100644
--- a/sys/dev/pv/xen.c
+++ b/sys/dev/pv/xen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xen.c,v 1.32 2016/01/22 19:26:40 mikeb Exp $ */
+/* $OpenBSD: xen.c,v 1.33 2016/01/22 19:28:16 mikeb Exp $ */
/*
* Copyright (c) 2015 Mike Belopuhov
@@ -941,7 +941,7 @@ xen_grant_table_remove(struct xen_softc *sc, grant_ref_t ref)
/* Invalidate the grant reference */
ptr = (uint32_t *)&ge->ge_table[ref];
flags = (ge->ge_table[ref].flags & ~(GTF_reading | GTF_writing));
- while (atomic_cas_uint(ptr, flags, 0) != flags)
+ while (atomic_cas_uint(ptr, flags, GTF_invalid) != flags)
CPU_BUSY_CYCLE();
ge->ge_table[ref].frame = 0xffffffff;
mtx_leave(&ge->ge_mtx);