Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/alpha/include Nix mb_* on alpha.



details:   https://anonhg.NetBSD.org/src/rev/3feedb9f59c6
branches:  trunk
changeset: 846715:3feedb9f59c6
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Fri Nov 29 20:05:07 2019 +0000

description:
Nix mb_* on alpha.

diffstat:

 sys/arch/alpha/include/lock.h  |  21 +--------------------
 sys/arch/alpha/include/mutex.h |   6 +++---
 2 files changed, 4 insertions(+), 23 deletions(-)

diffs (53 lines):

diff -r 3e77a5c5dd74 -r 3feedb9f59c6 sys/arch/alpha/include/lock.h
--- a/sys/arch/alpha/include/lock.h     Fri Nov 29 20:04:52 2019 +0000
+++ b/sys/arch/alpha/include/lock.h     Fri Nov 29 20:05:07 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lock.h,v 1.29 2017/09/17 00:01:07 christos Exp $ */
+/* $NetBSD: lock.h,v 1.30 2019/11/29 20:05:07 riastradh Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -174,23 +174,4 @@
 #define        SPINLOCK_BACKOFF_HOOK   (void)nullop((void *)0)
 #endif /* MULTIPROCESSOR */
 
-static __inline void
-mb_read(void)
-{
-       __asm __volatile("mb" : : : "memory");
-}
-
-static __inline void
-mb_write(void)
-{
-       /* XXX wmb */
-       __asm __volatile("mb" : : : "memory");
-}
-
-static __inline void
-mb_memory(void)
-{
-       __asm __volatile("mb" : : : "memory");
-}
-
 #endif /* _ALPHA_LOCK_H_ */
diff -r 3e77a5c5dd74 -r 3feedb9f59c6 sys/arch/alpha/include/mutex.h
--- a/sys/arch/alpha/include/mutex.h    Fri Nov 29 20:04:52 2019 +0000
+++ b/sys/arch/alpha/include/mutex.h    Fri Nov 29 20:05:07 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mutex.h,v 1.4 2008/04/28 20:23:11 martin Exp $ */
+/*     $NetBSD: mutex.h,v 1.5 2019/11/29 20:05:07 riastradh Exp $      */
 
 /*-
  * Copyright (c) 2002, 2006, 2007 The NetBSD Foundation, Inc.
@@ -60,8 +60,8 @@
 #define        __HAVE_SIMPLE_MUTEXES           1
 #define        __HAVE_MUTEX_STUBS              1
 
-#define        MUTEX_RECEIVE(mtx)              mb_read()
-#define        MUTEX_GIVE(mtx)                 mb_memory()
+#define        MUTEX_RECEIVE(mtx)              __asm __volatile("mb" : : : "memory")
+#define        MUTEX_GIVE(mtx)                 __asm __volatile("mb" : : : "memory")
 
 #define        MUTEX_CAS(p, o, n)              _lock_cas((p), (o), (n))
 



Home | Main Index | Thread Index | Old Index