131a53cd0SKonstantin Belousov /*- 2*ebf5747bSPedro F. Giffuni * SPDX-License-Identifier: BSD-3-Clause 3*ebf5747bSPedro F. Giffuni * 431a53cd0SKonstantin Belousov * Copyright (c) 1999 Marcel Moolenaar 531a53cd0SKonstantin Belousov * All rights reserved. 631a53cd0SKonstantin Belousov * 731a53cd0SKonstantin Belousov * Redistribution and use in source and binary forms, with or without 831a53cd0SKonstantin Belousov * modification, are permitted provided that the following conditions 931a53cd0SKonstantin Belousov * are met: 1031a53cd0SKonstantin Belousov * 1. Redistributions of source code must retain the above copyright 1131a53cd0SKonstantin Belousov * notice, this list of conditions and the following disclaimer 1231a53cd0SKonstantin Belousov * in this position and unchanged. 1331a53cd0SKonstantin Belousov * 2. Redistributions in binary form must reproduce the above copyright 1431a53cd0SKonstantin Belousov * notice, this list of conditions and the following disclaimer in the 1531a53cd0SKonstantin Belousov * documentation and/or other materials provided with the distribution. 1631a53cd0SKonstantin Belousov * 3. The name of the author may not be used to endorse or promote products 1731a53cd0SKonstantin Belousov * derived from this software without specific prior written permission. 1831a53cd0SKonstantin Belousov * 1931a53cd0SKonstantin Belousov * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 2031a53cd0SKonstantin Belousov * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 2131a53cd0SKonstantin Belousov * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2231a53cd0SKonstantin Belousov * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 2331a53cd0SKonstantin Belousov * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2431a53cd0SKonstantin Belousov * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2531a53cd0SKonstantin Belousov * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2631a53cd0SKonstantin Belousov * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2731a53cd0SKonstantin Belousov * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2831a53cd0SKonstantin Belousov * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2931a53cd0SKonstantin Belousov */ 3031a53cd0SKonstantin Belousov 3131a53cd0SKonstantin Belousov #ifndef _X86_SIGFRAME_H_ 3231a53cd0SKonstantin Belousov #define _X86_SIGFRAME_H_ 3331a53cd0SKonstantin Belousov 3431a53cd0SKonstantin Belousov /* 3531a53cd0SKonstantin Belousov * Signal frames, arguments passed to application signal handlers. 3631a53cd0SKonstantin Belousov */ 3731a53cd0SKonstantin Belousov 3831a53cd0SKonstantin Belousov #ifdef __i386__ 3931a53cd0SKonstantin Belousov struct sigframe { 4031a53cd0SKonstantin Belousov /* 4131a53cd0SKonstantin Belousov * The first four members may be used by applications. 4231a53cd0SKonstantin Belousov * 4331a53cd0SKonstantin Belousov * NOTE: The 4th argument is undocumented, ill commented 4431a53cd0SKonstantin Belousov * on and seems to be somewhat BSD "standard". Handlers 4531a53cd0SKonstantin Belousov * installed with sigvec may be using it. 4631a53cd0SKonstantin Belousov */ 4731a53cd0SKonstantin Belousov register_t sf_signum; 4831a53cd0SKonstantin Belousov register_t sf_siginfo; /* code or pointer to sf_si */ 4931a53cd0SKonstantin Belousov register_t sf_ucontext; /* points to sf_uc */ 5031a53cd0SKonstantin Belousov register_t sf_addr; /* undocumented 4th arg */ 5131a53cd0SKonstantin Belousov 5231a53cd0SKonstantin Belousov union { 5331a53cd0SKonstantin Belousov __siginfohandler_t *sf_action; 5431a53cd0SKonstantin Belousov __sighandler_t *sf_handler; 5531a53cd0SKonstantin Belousov } sf_ahu; 5631a53cd0SKonstantin Belousov ucontext_t sf_uc; /* = *sf_ucontext */ 5731a53cd0SKonstantin Belousov siginfo_t sf_si; /* = *sf_siginfo (SA_SIGINFO case) */ 5831a53cd0SKonstantin Belousov }; 5931a53cd0SKonstantin Belousov #endif /* __i386__ */ 6031a53cd0SKonstantin Belousov 6131a53cd0SKonstantin Belousov #ifdef __amd64__ 6231a53cd0SKonstantin Belousov struct sigframe { 6331a53cd0SKonstantin Belousov union { 6431a53cd0SKonstantin Belousov __siginfohandler_t *sf_action; 6531a53cd0SKonstantin Belousov __sighandler_t *sf_handler; 6631a53cd0SKonstantin Belousov } sf_ahu; 6731a53cd0SKonstantin Belousov ucontext_t sf_uc; /* = *sf_ucontext */ 6831a53cd0SKonstantin Belousov siginfo_t sf_si; /* = *sf_siginfo (SA_SIGINFO case) */ 6931a53cd0SKonstantin Belousov }; 7031a53cd0SKonstantin Belousov #endif /* __amd64__ */ 7131a53cd0SKonstantin Belousov 7231a53cd0SKonstantin Belousov #endif /* _X86_SIGFRAME_H_ */ 73