Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/ia64/include PR port-ia64/51261
details: https://anonhg.NetBSD.org/src/rev/ee66b48eda7b
branches: trunk
changeset: 346880:ee66b48eda7b
user: scole <scole%NetBSD.org@localhost>
date: Fri Aug 05 16:59:26 2016 +0000
description:
PR port-ia64/51261
Add mb_read mb_write mb_memory
diffstat:
sys/arch/ia64/include/lock.h | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)
diffs (36 lines):
diff -r 9bfaa43874c8 -r ee66b48eda7b sys/arch/ia64/include/lock.h
--- a/sys/arch/ia64/include/lock.h Fri Aug 05 16:58:33 2016 +0000
+++ b/sys/arch/ia64/include/lock.h Fri Aug 05 16:59:26 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lock.h,v 1.4 2009/07/20 04:41:37 kiyohara Exp $ */
+/* $NetBSD: lock.h,v 1.5 2016/08/05 16:59:26 scole Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -116,4 +116,26 @@
*lockp = __SIMPLELOCK_UNLOCKED;
}
+/* XXX mf.a overkill for these? */
+static __inline void
+mb_read(void)
+{
+ __asm __volatile("mf.a \n"
+ "mf \n" ::: "memory");
+}
+
+static __inline void
+mb_write(void)
+{
+ __asm __volatile("mf.a \n"
+ "mf \n" ::: "memory");
+}
+
+static __inline void
+mb_memory(void)
+{
+ __asm __volatile("mf.a \n"
+ "mf \n" ::: "memory");
+}
+
#endif /* _IA64_LOCK_H_ */
Home |
Main Index |
Thread Index |
Old Index