Source-Changes-HG archive

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

[src/trunk]: src/sys exec_lock: declare it in the header, and mark with __cac...



details:   https://anonhg.NetBSD.org/src/rev/238b8712a916
branches:  trunk
changeset: 1006681:238b8712a916
user:      ad <ad%NetBSD.org@localhost>
date:      Thu Jan 23 10:05:44 2020 +0000

description:
exec_lock: declare it in the header, and mark with __cachline_aligned.

diffstat:

 sys/kern/kern_exec.c |  10 +++++-----
 sys/sys/exec.h       |   4 +++-
 2 files changed, 8 insertions(+), 6 deletions(-)

diffs (56 lines):

diff -r 1d26b8a811dc -r 238b8712a916 sys/kern/kern_exec.c
--- a/sys/kern/kern_exec.c      Thu Jan 23 09:09:59 2020 +0000
+++ b/sys/kern/kern_exec.c      Thu Jan 23 10:05:44 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_exec.c,v 1.488 2020/01/12 22:03:22 ad Exp $       */
+/*     $NetBSD: kern_exec.c,v 1.489 2020/01/23 10:05:44 ad Exp $       */
 
 /*-
  * Copyright (c) 2008, 2019 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.488 2020/01/12 22:03:22 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.489 2020/01/23 10:05:44 ad Exp $");
 
 #include "opt_exec.h"
 #include "opt_execfmt.h"
@@ -246,9 +246,9 @@
  * Exec lock. Used to control access to execsw[] structures.
  * This must not be static so that netbsd32 can access it, too.
  */
-krwlock_t exec_lock;
-
-static kmutex_t sigobject_lock;
+krwlock_t exec_lock __cacheline_aligned;
+
+static kmutex_t sigobject_lock __cacheline_aligned;
 
 /*
  * Data used between a loadvm and execve part of an "exec" operation
diff -r 1d26b8a811dc -r 238b8712a916 sys/sys/exec.h
--- a/sys/sys/exec.h    Thu Jan 23 09:09:59 2020 +0000
+++ b/sys/sys/exec.h    Thu Jan 23 10:05:44 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exec.h,v 1.158 2020/01/12 18:30:58 ad Exp $    */
+/*     $NetBSD: exec.h,v 1.159 2020/01/23 10:05:44 ad Exp $    */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -139,6 +139,7 @@
  */
 
 #include <sys/uio.h>
+#include <sys/rwlock.h>
 
 struct lwp;
 struct proc;
@@ -312,6 +313,7 @@
     struct pathbuf **, size_t *);
 
 extern int     maxexec;
+extern krwlock_t exec_lock;
 
 /*
  * Utility functions



Home | Main Index | Thread Index | Old Index