Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Deal with signal trampoline being const.
details: https://anonhg.NetBSD.org/src/rev/71ab81af438e
branches: trunk
changeset: 552544:71ab81af438e
user: matt <matt%NetBSD.org@localhost>
date: Sat Sep 27 00:57:45 2003 +0000
description:
Deal with signal trampoline being const.
diffstat:
sys/kern/kern_sig.c | 14 +++++++-------
sys/sys/signalvar.h | 6 +++---
2 files changed, 10 insertions(+), 10 deletions(-)
diffs (72 lines):
diff -r 86387115ed0a -r 71ab81af438e sys/kern/kern_sig.c
--- a/sys/kern/kern_sig.c Fri Sep 26 23:11:16 2003 +0000
+++ b/sys/kern/kern_sig.c Sat Sep 27 00:57:45 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_sig.c,v 1.161 2003/09/26 22:14:19 matt Exp $ */
+/* $NetBSD: kern_sig.c,v 1.162 2003/09/27 00:57:45 matt Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.161 2003/09/26 22:14:19 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.162 2003/09/27 00:57:45 matt Exp $");
#include "opt_ktrace.h"
#include "opt_compat_sunos.h"
@@ -262,7 +262,7 @@
int
sigaction1(struct proc *p, int signum, const struct sigaction *nsa,
- struct sigaction *osa, void *tramp, int vers)
+ struct sigaction *osa, const void *tramp, int vers)
{
struct sigacts *ps;
int prop;
@@ -273,13 +273,13 @@
/*
* Trampoline ABI version 0 is reserved for the legacy
- * kernel-provided on-stack trampoline. Conversely, if
- * we are using a non-0 ABI version, we must have a
- * trampoline.
+ * kernel-provided on-stack trampoline. Conversely, if we are
+ * using a non-0 ABI version, we must have a trampoline. Only
+ * validate the vers if a new sigaction was supplied.
*/
if ((vers != 0 && tramp == NULL) ||
#ifdef SIGTRAMP_VALID
- !SIGTRAMP_VALID(vers) ||
+ (nsa != NULL && !SIGTRAMP_VALID(vers)) ||
#endif
(vers == 0 && tramp != NULL))
return (EINVAL);
diff -r 86387115ed0a -r 71ab81af438e sys/sys/signalvar.h
--- a/sys/sys/signalvar.h Fri Sep 26 23:11:16 2003 +0000
+++ b/sys/sys/signalvar.h Sat Sep 27 00:57:45 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: signalvar.h,v 1.46 2003/09/26 12:02:57 simonb Exp $ */
+/* $NetBSD: signalvar.h,v 1.47 2003/09/27 00:57:45 matt Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -47,7 +47,7 @@
struct sigacts {
struct sigact_sigdesc {
struct sigaction sd_sigact;
- void *sd_tramp;
+ const void *sd_tramp;
int sd_vers;
} sa_sigdesc[NSIG]; /* disposition of signals */
@@ -164,7 +164,7 @@
struct lwp *proc_unstop __P((struct proc *p));
int sigaction1 __P((struct proc *, int, const struct sigaction *,
- struct sigaction *, void *, int));
+ struct sigaction *, const void *, int));
int sigprocmask1 __P((struct proc *, int, const sigset_t *, sigset_t *));
void sigpending1 __P((struct proc *, sigset_t *));
int sigsuspend1 __P((struct proc *, const sigset_t *));
Home |
Main Index |
Thread Index |
Old Index