Module Name: src Committed By: rmind Date: Wed Apr 27 00:38:37 UTC 2011
Modified Files: src/sys/kern: kern_sig.c src/sys/sys: signalvar.h Log Message: Make stopsigmask static, sprinkle __cacheline_aligned and __read_mostly. To generate a diff of this commit: cvs rdiff -u -r1.307 -r1.308 src/sys/kern/kern_sig.c cvs rdiff -u -r1.78 -r1.79 src/sys/sys/signalvar.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_sig.c diff -u src/sys/kern/kern_sig.c:1.307 src/sys/kern/kern_sig.c:1.308 --- src/sys/kern/kern_sig.c:1.307 Mon Jan 17 07:13:31 2011 +++ src/sys/kern/kern_sig.c Wed Apr 27 00:38:37 2011 @@ -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); Index: src/sys/sys/signalvar.h diff -u src/sys/sys/signalvar.h:1.78 src/sys/sys/signalvar.h:1.79 --- src/sys/sys/signalvar.h:1.78 Fri Jan 14 02:06:34 2011 +++ src/sys/sys/signalvar.h Wed Apr 27 00:38:37 2011 @@ -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;