Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sh3/include sh3: __cpu_simple_unlock needs __insn_b...



details:   https://anonhg.NetBSD.org/src/rev/9707f6074ef1
branches:  trunk
changeset: 361542:9707f6074ef1
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Feb 13 13:41:53 2022 +0000

description:
sh3: __cpu_simple_unlock needs __insn_barrier.

No multiprocessor support here but the compiler can still reorder
memory access.

diffstat:

 sys/arch/sh3/include/lock.h |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r d92f37b4b30f -r 9707f6074ef1 sys/arch/sh3/include/lock.h
--- a/sys/arch/sh3/include/lock.h       Sun Feb 13 13:41:44 2022 +0000
+++ b/sys/arch/sh3/include/lock.h       Sun Feb 13 13:41:53 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lock.h,v 1.18 2019/11/29 20:06:08 riastradh Exp $      */
+/*     $NetBSD: lock.h,v 1.19 2022/02/13 13:41:53 riastradh Exp $      */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -107,6 +107,7 @@
 __cpu_simple_unlock(__cpu_simple_lock_t *alp)
 {
 
+       __insn_barrier();
        *alp = __SIMPLELOCK_UNLOCKED;
 }
 



Home | Main Index | Thread Index | Old Index