Source-Changes-HG archive

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

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



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

description:
Nix mb_* on hppa.

diffstat:

 sys/arch/hppa/include/lock.h  |  20 +-------------------
 sys/arch/hppa/include/mutex.h |   6 +++---
 2 files changed, 4 insertions(+), 22 deletions(-)

diffs (53 lines):

diff -r 707103e80728 -r f2ced9fd6214 sys/arch/hppa/include/lock.h
--- a/sys/arch/hppa/include/lock.h      Fri Nov 29 20:05:19 2019 +0000
+++ b/sys/arch/hppa/include/lock.h      Fri Nov 29 20:05:29 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lock.h,v 1.21 2019/04/16 12:25:17 skrll Exp $  */
+/*     $NetBSD: lock.h,v 1.22 2019/11/29 20:05:29 riastradh Exp $      */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -141,22 +141,4 @@
        *__aptr = __SIMPLELOCK_RAW_UNLOCKED;
 }
 
-static __inline void
-mb_read(void)
-{
-       __sync();
-}
-
-static __inline void
-mb_write(void)
-{
-       __sync();
-}
-
-static __inline void
-mb_memory(void)
-{
-       __sync();
-}
-
 #endif /* _HPPA_LOCK_H_ */
diff -r 707103e80728 -r f2ced9fd6214 sys/arch/hppa/include/mutex.h
--- a/sys/arch/hppa/include/mutex.h     Fri Nov 29 20:05:19 2019 +0000
+++ b/sys/arch/hppa/include/mutex.h     Fri Nov 29 20:05:29 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mutex.h,v 1.13 2017/10/04 23:04:42 christos Exp $      */
+/*     $NetBSD: mutex.h,v 1.14 2019/11/29 20:05:29 riastradh Exp $     */
 
 /*-
  * Copyright (c) 2002, 2007 The NetBSD Foundation, Inc.
@@ -99,9 +99,9 @@
 static inline int
 MUTEX_SET_WAITERS(struct kmutex *mtx, uintptr_t owner)
 {
-       mb_write();
+       __sync();               /* formerly mb_read */
        mtx->mtx_waiters = 1;
-       mb_memory();
+       __sync();               /* formerly mb_memory */
        return mtx->mtx_owner != MUTEX_ADAPTIVE_UNOWNED;
 }
 



Home | Main Index | Thread Index | Old Index