Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern __HAVE_ATOMIC_AS_MEMBAR is spelled with two leading...



details:   https://anonhg.NetBSD.org/src/rev/a99a47f138d1
branches:  trunk
changeset: 326595:a99a47f138d1
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Thu Feb 06 03:47:16 2014 +0000

description:
__HAVE_ATOMIC_AS_MEMBAR is spelled with two leading underscores.

This underscores the need to replace this error-prone cpp API by
unconditionally defined {pre,post}atomic_membar_*.

This change should only remove unnecessary membar_producers on x86.

diffstat:

 sys/kern/subr_pcq.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 79af07e9edfd -r a99a47f138d1 sys/kern/subr_pcq.c
--- a/sys/kern/subr_pcq.c       Thu Feb 06 02:51:28 2014 +0000
+++ b/sys/kern/subr_pcq.c       Thu Feb 06 03:47:16 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_pcq.c,v 1.6 2012/01/31 20:40:09 alnsn Exp $       */
+/*     $NetBSD: subr_pcq.c,v 1.7 2014/02/06 03:47:16 riastradh Exp $   */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_pcq.c,v 1.6 2012/01/31 20:40:09 alnsn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_pcq.c,v 1.7 2014/02/06 03:47:16 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -115,7 +115,7 @@
         * that the caller made to the data item are globally visible
         * before we put it onto the list.
         */
-#ifndef _HAVE_ATOMIC_AS_MEMBAR
+#ifndef __HAVE_ATOMIC_AS_MEMBAR
        membar_producer();
 #endif
        pcq->pcq_items[op] = item;
@@ -180,7 +180,7 @@
         * after it, we could in theory wipe out a modification made
         * to pcq_items[] by pcq_put().
         */
-#ifndef _HAVE_ATOMIC_AS_MEMBAR
+#ifndef __HAVE_ATOMIC_AS_MEMBAR
        membar_producer();
 #endif
        while (__predict_false(atomic_cas_32(&pcq->pcq_pc, v, nv) != v)) {



Home | Main Index | Thread Index | Old Index