#define __HAVE_ATOMIC_AS_MEMBAR, indicating that:

- atomic_cas_ni() does an implicit membar_exit()
- all other atomic operations do an implicit membar_sync()

While this might seem kind of arbitrary it's the basis for some important
optimizations.
This commit is contained in:
ad 2008-02-21 16:31:13 +00:00
parent a683a1b3c2
commit bc9a63754d
2 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: types.h,v 1.25 2008/01/20 18:09:04 joerg Exp $ */
/* $NetBSD: types.h,v 1.26 2008/02/21 16:31:13 ad Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -72,6 +72,7 @@ typedef volatile unsigned char __cpu_simple_lock_t;
#define __HAVE_SYSCALL_INTERN
#define __HAVE_MINIMAL_EMUL
#define __HAVE_ATOMIC64_OPS
#define __HAVE_ATOMIC_AS_MEMBAR
#ifdef _KERNEL_OPT
#include "opt_xen.h"

View File

@ -1,4 +1,4 @@
/* $NetBSD: types.h,v 1.58 2008/01/23 19:46:44 bouyer Exp $ */
/* $NetBSD: types.h,v 1.59 2008/02/21 16:31:13 ad Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -82,6 +82,7 @@ typedef volatile unsigned char __cpu_simple_lock_t;
#define __HAVE_MINIMAL_EMUL
#define __HAVE_OLD_DISKLABEL
#define __HAVE_ATOMIC64_OPS
#define __HAVE_ATOMIC_AS_MEMBAR
#if defined(_KERNEL)
#define __HAVE_RAS