Source-Changes-HG archive

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

[src/trunk]: src/sys rwlock(9): Nix extern _rw_init in .c; use sys/rwlock.h.



details:   https://anonhg.NetBSD.org/src/rev/da2b00cceec4
branches:  trunk
changeset: 372059:da2b00cceec4
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Oct 26 23:22:22 2022 +0000

description:
rwlock(9): Nix extern _rw_init in .c; use sys/rwlock.h.

diffstat:

 sys/kern/kern_rwlock_obj.c        |  6 ++----
 sys/rump/librump/rumpkern/locks.c |  5 ++---
 sys/sys/rwlock.h                  |  4 ++--
 3 files changed, 6 insertions(+), 9 deletions(-)

diffs (85 lines):

diff -r d48690e2da7d -r da2b00cceec4 sys/kern/kern_rwlock_obj.c
--- a/sys/kern/kern_rwlock_obj.c        Wed Oct 26 23:22:07 2022 +0000
+++ b/sys/kern/kern_rwlock_obj.c        Wed Oct 26 23:22:22 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_rwlock_obj.c,v 1.7 2022/04/09 23:38:33 riastradh Exp $    */
+/*     $NetBSD: kern_rwlock_obj.c,v 1.8 2022/10/26 23:22:22 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2008, 2009, 2019 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_rwlock_obj.c,v 1.7 2022/04/09 23:38:33 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_rwlock_obj.c,v 1.8 2022/10/26 23:22:22 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -87,7 +87,6 @@
 rw_obj_alloc(void)
 {
        struct krwobj *ro;
-       extern void _rw_init(krwlock_t *, uintptr_t);
 
        ro = pool_cache_get(rw_obj_cache, PR_WAITOK);
        _rw_init(&ro->ro_lock, (uintptr_t)__builtin_return_address(0));
@@ -105,7 +104,6 @@
 rw_obj_tryalloc(void)
 {
        struct krwobj *ro;
-       extern void _rw_init(krwlock_t *, uintptr_t);
 
        ro = pool_cache_get(rw_obj_cache, PR_NOWAIT);
        if (__predict_true(ro != NULL)) {
diff -r d48690e2da7d -r da2b00cceec4 sys/rump/librump/rumpkern/locks.c
--- a/sys/rump/librump/rumpkern/locks.c Wed Oct 26 23:22:07 2022 +0000
+++ b/sys/rump/librump/rumpkern/locks.c Wed Oct 26 23:22:22 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locks.c,v 1.82 2022/10/26 23:21:20 riastradh Exp $     */
+/*     $NetBSD: locks.c,v 1.83 2022/10/26 23:22:22 riastradh Exp $     */
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.82 2022/10/26 23:21:20 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.83 2022/10/26 23:22:22 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/kmem.h>
@@ -246,7 +246,6 @@
        }
 }
 
-void _rw_init(krwlock_t *, uintptr_t);
 void
 _rw_init(krwlock_t *rw, uintptr_t return_address)
 {
diff -r d48690e2da7d -r da2b00cceec4 sys/sys/rwlock.h
--- a/sys/sys/rwlock.h  Wed Oct 26 23:22:07 2022 +0000
+++ b/sys/sys/rwlock.h  Wed Oct 26 23:22:22 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rwlock.h,v 1.16 2020/02/22 21:24:45 ad Exp $   */
+/*     $NetBSD: rwlock.h,v 1.17 2022/10/26 23:22:22 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2002, 2006, 2007, 2008, 2019, 2020 The NetBSD Foundation, Inc.
@@ -83,7 +83,6 @@
 void   rw_vector_enter(krwlock_t *, const krw_t);
 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 */
 
@@ -93,6 +92,7 @@
 
 #ifdef _KERNEL
 
+void   _rw_init(krwlock_t *, uintptr_t);
 void   rw_init(krwlock_t *);
 void   rw_destroy(krwlock_t *);
 



Home | Main Index | Thread Index | Old Index