Source-Changes-HG archive

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

[src/ad-namecache]: src/sys Remove unintentional differences to base.



details:   https://anonhg.NetBSD.org/src/rev/aaadcb3cee59
branches:  ad-namecache
changeset: 983016:aaadcb3cee59
user:      ad <ad%NetBSD.org@localhost>
date:      Sat Jan 25 21:45:00 2020 +0000

description:
Remove unintentional differences to base.

diffstat:

 sys/kern/kern_rwlock.c             |  34 +++-------------------------------
 sys/kern/kern_synch.c              |   5 ++---
 sys/rump/include/rump/rump_namei.h |   4 ++--
 sys/sys/rwlock.h                   |  11 +++++------
 4 files changed, 12 insertions(+), 42 deletions(-)

diffs (145 lines):

diff -r 8b1c58a0d77a -r aaadcb3cee59 sys/kern/kern_rwlock.c
--- a/sys/kern/kern_rwlock.c    Sat Jan 25 18:42:24 2020 +0000
+++ b/sys/kern/kern_rwlock.c    Sat Jan 25 21:45:00 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_rwlock.c,v 1.59.2.4 2020/01/22 11:40:17 ad Exp $  */
+/*     $NetBSD: kern_rwlock.c,v 1.59.2.5 2020/01/25 21:45:00 ad Exp $  */
 
 /*-
  * Copyright (c) 2002, 2006, 2007, 2008, 2009, 2019, 2020
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.59.2.4 2020/01/22 11:40:17 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.59.2.5 2020/01/25 21:45:00 ad Exp $");
 
 #include "opt_lockdebug.h"
 
@@ -206,15 +206,10 @@
 _rw_init(krwlock_t *rw, uintptr_t return_address)
 {
 
-#ifdef LOCKDEBUG
-       /* XXX only because the assembly stubs can't handle RW_NODEBUG */
        if (LOCKDEBUG_ALLOC(rw, &rwlock_lockops, return_address))
                rw->rw_owner = 0;
        else
                rw->rw_owner = RW_NODEBUG;
-#else
-       rw->rw_owner = 0;
-#endif
 }
 
 void
@@ -650,7 +645,7 @@
                        RW_ASSERT(rw, (rw->rw_owner & RW_HAS_WAITERS) != 0);
 
                        newown = owner & RW_NODEBUG;
-                       newown |= RW_READ_INCR | RW_HAS_WAITERS |
+                       newown = RW_READ_INCR | RW_HAS_WAITERS |
                            RW_WRITE_WANTED;
                        next = rw_cas(rw, owner, newown);
                        turnstile_exit(rw);
@@ -792,26 +787,3 @@
 
        return (void *)(owner & RW_THREAD);
 }
-
-/*
- * rw_owner_running:
- *
- *     Return true if a RW lock is unheld, or write held and the owner is
- *     running on a CPU.  For the pagedaemon.
- */
-bool
-rw_owner_running(const krwlock_t *rw)
-{
-#ifdef MULTIPROCESSOR
-       uintptr_t owner;
-       bool rv;
-
-       kpreempt_disable();
-       owner = rw->rw_owner;
-       rv = (owner & RW_THREAD) == 0 || rw_oncpu(owner);
-       kpreempt_enable();
-       return rv;
-#else
-       return rw_owner(rw) == curlwp;
-#endif
-}
diff -r 8b1c58a0d77a -r aaadcb3cee59 sys/kern/kern_synch.c
--- a/sys/kern/kern_synch.c     Sat Jan 25 18:42:24 2020 +0000
+++ b/sys/kern/kern_synch.c     Sat Jan 25 21:45:00 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_synch.c,v 1.334.2.3 2020/01/23 12:17:08 ad Exp $  */
+/*     $NetBSD: kern_synch.c,v 1.334.2.4 2020/01/25 21:45:00 ad Exp $  */
 
 /*-
  * Copyright (c) 1999, 2000, 2004, 2006, 2007, 2008, 2009, 2019
@@ -69,7 +69,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.334.2.3 2020/01/23 12:17:08 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.334.2.4 2020/01/25 21:45:00 ad Exp $");
 
 #include "opt_kstack.h"
 #include "opt_dtrace.h"
@@ -83,7 +83,6 @@
 #include <sys/cpu.h>
 #include <sys/pserialize.h>
 #include <sys/resourcevar.h>
-#include <sys/rwlock.h>
 #include <sys/sched.h>
 #include <sys/syscall_stats.h>
 #include <sys/sleepq.h>
diff -r 8b1c58a0d77a -r aaadcb3cee59 sys/rump/include/rump/rump_namei.h
--- a/sys/rump/include/rump/rump_namei.h        Sat Jan 25 18:42:24 2020 +0000
+++ b/sys/rump/include/rump/rump_namei.h        Sat Jan 25 21:45:00 2020 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: rump_namei.h,v 1.37.2.3 2020/01/17 21:47:36 ad Exp $   */
+/*     $NetBSD: rump_namei.h,v 1.37.2.4 2020/01/25 21:45:00 ad Exp $   */
 
 
 /*
  * WARNING: GENERATED FILE.  DO NOT EDIT
  * (edit namei.src and run make namei in src/sys/sys)
  *   by:   NetBSD: gennameih.awk,v 1.5 2009/12/23 14:17:19 pooka Exp 
- *   from: NetBSD: namei.src,v 1.47.2.3 2020/01/14 11:07:40 ad Exp 
+ *   from: NetBSD: namei.src,v 1.48 2020/01/08 12:04:56 ad Exp 
  */
 
 #ifndef _RUMP_RUMP_NAMEI_H_
diff -r 8b1c58a0d77a -r aaadcb3cee59 sys/sys/rwlock.h
--- a/sys/sys/rwlock.h  Sat Jan 25 18:42:24 2020 +0000
+++ b/sys/sys/rwlock.h  Sat Jan 25 21:45:00 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rwlock.h,v 1.12.2.2 2020/01/22 11:40:17 ad Exp $       */
+/*     $NetBSD: rwlock.h,v 1.12.2.3 2020/01/25 21:45:00 ad Exp $       */
 
 /*-
  * Copyright (c) 2002, 2006, 2007, 2008, 2019, 2020 The NetBSD Foundation, Inc.
@@ -63,10 +63,10 @@
  * WRITE_LOCKED bit is clear, then the owner field is actually a count of
  * the number of readers.  The rw_owner field is laid out like so:
  *
- *  N                     5        4        3        2        1        0
- *  +------------------------------------------------------------------+
- *  | owner or read count | nodbug | <free> | wrlock | wrwant |  wait  |
- *  +------------------------------------------------------------------+
+ *      N                    4        3        2        1        0
+ *     +---------------------------------------------------------+
+ *     | owner or read count | nodbug | wrlock | wrwant |  wait  |
+ *     +---------------------------------------------------------+
  */
 #define        RW_HAS_WAITERS          0x01UL  /* lock has waiters */
 #define        RW_WRITE_WANTED         0x02UL  /* >= 1 waiter is a writer */
@@ -84,7 +84,6 @@
 void   rw_vector_exit(krwlock_t *);
 int    rw_vector_tryenter(krwlock_t *, const krw_t);
 void   _rw_init(krwlock_t *, uintptr_t);
-bool   rw_owner_running(const krwlock_t *);
 #endif /* __RWLOCK_PRIVATE */
 
 struct krwlock {



Home | Main Index | Thread Index | Old Index