Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/arch/ns32k siginfo trampoline addition. This is not...



details:   https://anonhg.NetBSD.org/src/rev/85be51af71b2
branches:  trunk
changeset: 554981:85be51af71b2
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Nov 06 02:28:00 2003 +0000

description:
siginfo trampoline addition. This is not used until simon verifies that it
works.

diffstat:

 lib/libc/arch/ns32k/Makefile.inc      |   4 +-
 lib/libc/arch/ns32k/sys/__sigtramp2.S |  58 +++++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+), 2 deletions(-)

diffs (77 lines):

diff -r 9b02c4a04e8e -r 85be51af71b2 lib/libc/arch/ns32k/Makefile.inc
--- a/lib/libc/arch/ns32k/Makefile.inc  Thu Nov 06 02:25:07 2003 +0000
+++ b/lib/libc/arch/ns32k/Makefile.inc  Thu Nov 06 02:28:00 2003 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.15 2003/08/01 17:03:52 lukem Exp $
+#      $NetBSD: Makefile.inc,v 1.16 2003/11/06 02:28:00 christos Exp $
 
 KMINCLUDES= arch/ns32k/SYS.h
 KMSRCS=        bcmp.S bcopy.S bzero.S ffs.S \
@@ -10,4 +10,4 @@
 DPSRCS+=${ASSRCS:S/S$/c/g:C/^./Lint_&/g}
 CLEANFILES+=${ASSRCS:S/S$/c/g:C/^./Lint_&/g}
 
-SRCS+= __sigaction14_sigtramp.c __sigtramp1.S
+SRCS+= __sigaction14_sigtramp.c __sigtramp1.S __sigtramp2.S
diff -r 9b02c4a04e8e -r 85be51af71b2 lib/libc/arch/ns32k/sys/__sigtramp2.S
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/arch/ns32k/sys/__sigtramp2.S     Thu Nov 06 02:28:00 2003 +0000
@@ -0,0 +1,58 @@
+/*     $NetBSD: __sigtramp2.S,v 1.1 2003/11/06 02:28:00 christos Exp $ */
+
+/*-
+ * Copyright (c) 2002 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Jason R. Thorpe and Simon Burge.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the NetBSD
+ *     Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "SYS.h"
+
+/*
+ * The ns32k signal trampoline is invoked only to return from
+ * the signal; the kernel calls the signal handler directly.
+ *
+ * On entry, stack looks like:
+ *
+ *     sp->    signal number                           [0]
+ *             siginfo_t pointer                       [4]
+ *             ucontext_t pointer                      [8]
+ *             siginfo_t structure                     [12]
+ *             ucontext_t structure                    [140]
+ */
+ENTRY_NOPROFILE(__sigtramp_sigcontext_1)
+       addr    140(sp),4(sp)           /* get pointer to sigcontext */
+                                       /* and put it in argument slot */
+       SYSTRAP(setcontext)             /* call setcontext */
+       movd    r0,4(sp)                /* exit with errno */
+       SYSTRAP(exit)                   /* if setcontext failed */



Home | Main Index | Thread Index | Old Index