Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/m68k/include Nix mb_* on m68k.
details: https://anonhg.NetBSD.org/src/rev/fe63000af87b
branches: trunk
changeset: 846719:fe63000af87b
user: riastradh <riastradh%NetBSD.org@localhost>
date: Fri Nov 29 20:05:49 2019 +0000
description:
Nix mb_* on m68k.
diffstat:
sys/arch/m68k/include/lock.h | 20 +-------------------
sys/arch/m68k/include/mutex.h | 6 +++---
2 files changed, 4 insertions(+), 22 deletions(-)
diffs (52 lines):
diff -r 6c154a1b5c9a -r fe63000af87b sys/arch/m68k/include/lock.h
--- a/sys/arch/m68k/include/lock.h Fri Nov 29 20:05:38 2019 +0000
+++ b/sys/arch/m68k/include/lock.h Fri Nov 29 20:05:49 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lock.h,v 1.15 2017/09/17 00:01:07 christos Exp $ */
+/* $NetBSD: lock.h,v 1.16 2019/11/29 20:05:49 riastradh Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -101,22 +101,4 @@
*alp = __SIMPLELOCK_UNLOCKED;
}
-static __inline void
-mb_read(void)
-{
- __asm volatile("" : : : "memory");
-}
-
-static __inline void
-mb_write(void)
-{
- __asm volatile("" : : : "memory");
-}
-
-static __inline void
-mb_memory(void)
-{
- __asm volatile("" : : : "memory");
-}
-
#endif /* _M68K_LOCK_H_ */
diff -r 6c154a1b5c9a -r fe63000af87b sys/arch/m68k/include/mutex.h
--- a/sys/arch/m68k/include/mutex.h Fri Nov 29 20:05:38 2019 +0000
+++ b/sys/arch/m68k/include/mutex.h Fri Nov 29 20:05:49 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mutex.h,v 1.7 2008/04/28 20:23:26 martin Exp $ */
+/* $NetBSD: mutex.h,v 1.8 2019/11/29 20:05:49 riastradh Exp $ */
/*-
* Copyright (c) 2002, 2007 The NetBSD Foundation, Inc.
@@ -62,8 +62,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) __insn_barrier()
+#define MUTEX_GIVE(mtx) __insn_barrier()
#define MUTEX_CAS(p, o, n) (atomic_cas_uint((p), (o), (n)) == (o))
Home |
Main Index |
Thread Index |
Old Index