Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Back out the fastpath change in xc_wait(). It's go...



details:   https://anonhg.NetBSD.org/src/rev/14bd1b3e6c17
branches:  trunk
changeset: 846792:14bd1b3e6c17
user:      ad <ad%NetBSD.org@localhost>
date:      Sun Dec 01 17:06:00 2019 +0000

description:
Back out the fastpath change in xc_wait().  It's going to be done differently.

diffstat:

 sys/kern/subr_xcall.c |  20 ++++++--------------
 1 files changed, 6 insertions(+), 14 deletions(-)

diffs (42 lines):

diff -r e0d59094dda0 -r 14bd1b3e6c17 sys/kern/subr_xcall.c
--- a/sys/kern/subr_xcall.c     Sun Dec 01 17:02:50 2019 +0000
+++ b/sys/kern/subr_xcall.c     Sun Dec 01 17:06:00 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_xcall.c,v 1.30 2019/12/01 16:32:01 ad Exp $       */
+/*     $NetBSD: subr_xcall.c,v 1.31 2019/12/01 17:06:00 ad Exp $       */
 
 /*-
  * Copyright (c) 2007-2010, 2019 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_xcall.c,v 1.30 2019/12/01 16:32:01 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_xcall.c,v 1.31 2019/12/01 17:06:00 ad Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -354,19 +354,11 @@
        }
 
        /* Block until awoken. */
-#ifdef _LP64                   /* Needs 64-bit load/store for atomicity. */
-       if (xc->xc_donep < where) {
-#endif
-               mutex_enter(&xc->xc_lock);
-               while (xc->xc_donep < where) {
-                       cv_wait(&xc->xc_busy, &xc->xc_lock);
-               }
-               mutex_exit(&xc->xc_lock);
-#ifdef _LP64
-       } else {
-               membar_enter();
+       mutex_enter(&xc->xc_lock);
+       while (xc->xc_donep < where) {
+               cv_wait(&xc->xc_busy, &xc->xc_lock);
        }
-#endif
+       mutex_exit(&xc->xc_lock);
 }
 
 /*



Home | Main Index | Thread Index | Old Index