From b7fef9e841acd7e80c0171b8c3384257d56b3b18 Mon Sep 17 00:00:00 2001 From: Mike Belopuhov Date: Fri, 22 Jan 2016 19:28:17 +0000 Subject: To facilitate reading make sure to use a GTF_invalid flag by name --- sys/dev/pv/xen.c | 4 ++-- 1 file 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); -- cgit v1.2.3