Module Name:    src
Committed By:   riastradh
Date:           Thu Feb  6 03:47:16 UTC 2014

Modified Files:
        src/sys/kern: subr_pcq.c

Log Message:
__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.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/kern/subr_pcq.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/subr_pcq.c
diff -u src/sys/kern/subr_pcq.c:1.6 src/sys/kern/subr_pcq.c:1.7
--- src/sys/kern/subr_pcq.c:1.6	Tue Jan 31 20:40:09 2012
+++ src/sys/kern/subr_pcq.c	Thu Feb  6 03:47:16 2014
@@ -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 @@ pcq_put(pcq_t *pcq, void *item)
 	 * 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 @@ pcq_get(pcq_t *pcq)
 	 * 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)) {

Reply via email to