Module Name: src
Committed By: ad
Date: Thu Jan 23 10:05:44 UTC 2020
Modified Files:
src/sys/kern: kern_exec.c
src/sys/sys: exec.h
Log Message:
exec_lock: declare it in the header, and mark with __cachline_aligned.
To generate a diff of this commit:
cvs rdiff -u -r1.488 -r1.489 src/sys/kern/kern_exec.c
cvs rdiff -u -r1.158 -r1.159 src/sys/sys/exec.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/kern_exec.c
diff -u src/sys/kern/kern_exec.c:1.488 src/sys/kern/kern_exec.c:1.489
--- src/sys/kern/kern_exec.c:1.488 Sun Jan 12 22:03:22 2020
+++ src/sys/kern/kern_exec.c Thu Jan 23 10:05:44 2020
@@ -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 @@ struct emul emul_netbsd = {
* 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;
+krwlock_t exec_lock __cacheline_aligned;
-static kmutex_t sigobject_lock;
+static kmutex_t sigobject_lock __cacheline_aligned;
/*
* Data used between a loadvm and execve part of an "exec" operation
Index: src/sys/sys/exec.h
diff -u src/sys/sys/exec.h:1.158 src/sys/sys/exec.h:1.159
--- src/sys/sys/exec.h:1.158 Sun Jan 12 18:30:58 2020
+++ src/sys/sys/exec.h Thu Jan 23 10:05:44 2020
@@ -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 @@ struct ps_strings32 {
*/
#include <sys/uio.h>
+#include <sys/rwlock.h>
struct lwp;
struct proc;
@@ -312,6 +313,7 @@ int exec_makepathbuf(struct lwp *,
struct pathbuf **, size_t *);
extern int maxexec;
+extern krwlock_t exec_lock;
/*
* Utility functions