Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Make stopsigmask static, sprinkle __cacheline_aligned an...
details: https://anonhg.NetBSD.org/src/rev/b1e7f94cf9a1
branches: trunk
changeset: 764550:b1e7f94cf9a1
user: rmind <rmind%NetBSD.org@localhost>
date: Wed Apr 27 00:38:37 2011 +0000
description:
Make stopsigmask static, sprinkle __cacheline_aligned and __read_mostly.
diffstat:
sys/kern/kern_sig.c | 29 ++++++++++++++++++++---------
sys/sys/signalvar.h | 4 ++--
2 files changed, 22 insertions(+), 11 deletions(-)
diffs (87 lines):
diff -r 9e4ae2cfc0d4 -r b1e7f94cf9a1 sys/kern/kern_sig.c
--- a/sys/kern/kern_sig.c Wed Apr 27 00:36:47 2011 +0000
+++ b/sys/kern/kern_sig.c Wed Apr 27 00:38:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_sig.c,v 1.307 2011/01/17 07:13:31 uebayasi Exp $ */
+/* $NetBSD: kern_sig.c,v 1.308 2011/04/27 00:38:37 rmind Exp $ */
/*-
* Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -65,8 +65,12 @@
* @(#)kern_sig.c 8.14 (Berkeley) 5/14/95
*/
+/*
+ * Signal subsystem.
+ */
+
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.307 2011/01/17 07:13:31 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.308 2011/04/27 00:38:37 rmind Exp $");
#include "opt_ptrace.h"
#include "opt_compat_sunos.h"
@@ -105,6 +109,18 @@
#include <uvm/uvm_extern.h>
#include <uvm/uvm_extern.h>
+static pool_cache_t sigacts_cache __read_mostly;
+static pool_cache_t ksiginfo_cache __read_mostly;
+static callout_t proc_stop_ch __cacheline_aligned;
+
+#ifdef KERN_SA
+static pool_cache_t siginfo_cache;
+#endif
+
+sigset_t contsigmask __cacheline_aligned;
+static sigset_t stopsigmask __cacheline_aligned;
+sigset_t sigcantmask __cacheline_aligned;
+
static void ksiginfo_exechook(struct proc *, void *);
static void proc_stop_callout(void *);
static int sigchecktrace(void);
@@ -113,13 +129,8 @@
static int sigunwait(struct proc *, const ksiginfo_t *);
static void sigswitch(bool, int, int);
-sigset_t contsigmask, stopsigmask, sigcantmask;
-static pool_cache_t sigacts_cache; /* memory pool for sigacts structures */
static void sigacts_poolpage_free(struct pool *, void *);
static void *sigacts_poolpage_alloc(struct pool *, int);
-static callout_t proc_stop_ch;
-static pool_cache_t siginfo_cache;
-static pool_cache_t ksiginfo_cache;
void (*sendsig_sigcontext_vec)(const struct ksiginfo *, const sigset_t *);
int (*coredump_vec)(struct lwp *, const char *) =
@@ -202,10 +213,10 @@
sigacts_cache = pool_cache_init(sizeof(struct sigacts), 0, 0, 0,
"sigacts", sizeof(struct sigacts) > PAGE_SIZE ?
&sigactspool_allocator : NULL, IPL_NONE, NULL, NULL, NULL);
-
+#ifdef KERN_SA
siginfo_cache = pool_cache_init(sizeof(siginfo_t), 0, 0, 0,
"siginfo", NULL, IPL_NONE, NULL, NULL, NULL);
-
+#endif
ksiginfo_cache = pool_cache_init(sizeof(ksiginfo_t), 0, 0, 0,
"ksiginfo", NULL, IPL_VM, NULL, NULL, NULL);
diff -r 9e4ae2cfc0d4 -r b1e7f94cf9a1 sys/sys/signalvar.h
--- a/sys/sys/signalvar.h Wed Apr 27 00:36:47 2011 +0000
+++ b/sys/sys/signalvar.h Wed Apr 27 00:38:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: signalvar.h,v 1.78 2011/01/14 02:06:34 rmind Exp $ */
+/* $NetBSD: signalvar.h,v 1.79 2011/04/27 00:38:37 rmind Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -120,7 +120,7 @@
#include <sys/systm.h> /* for copyin_t/copyout_t */
-extern sigset_t contsigmask, stopsigmask, sigcantmask;
+extern sigset_t contsigmask, sigcantmask;
struct vnode;
Home |
Main Index |
Thread Index |
Old Index