1e6e7f16cSDavid Xu /*- 24d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause 37f2d13d6SPedro F. Giffuni * 4e6e7f16cSDavid Xu * Copyright (c) 2006 David Xu <davidxu@freebsd.org> 5e6e7f16cSDavid Xu * All rights reserved. 6e6e7f16cSDavid Xu * 7e6e7f16cSDavid Xu * Redistribution and use in source and binary forms, with or without 8e6e7f16cSDavid Xu * modification, are permitted provided that the following conditions 9e6e7f16cSDavid Xu * are met: 10e6e7f16cSDavid Xu * 1. Redistributions of source code must retain the above copyright 11e6e7f16cSDavid Xu * notice, this list of conditions and the following disclaimer. 12e6e7f16cSDavid Xu * 2. Redistributions in binary form must reproduce the above copyright 13e6e7f16cSDavid Xu * notice, this list of conditions and the following disclaimer in the 14e6e7f16cSDavid Xu * documentation and/or other materials provided with the distribution. 15e6e7f16cSDavid Xu * 16e6e7f16cSDavid Xu * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17e6e7f16cSDavid Xu * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18e6e7f16cSDavid Xu * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19e6e7f16cSDavid Xu * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20e6e7f16cSDavid Xu * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21e6e7f16cSDavid Xu * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22e6e7f16cSDavid Xu * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23e6e7f16cSDavid Xu * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24e6e7f16cSDavid Xu * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25e6e7f16cSDavid Xu * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26e6e7f16cSDavid Xu * SUCH DAMAGE. 27e6e7f16cSDavid Xu */ 28e6e7f16cSDavid Xu 29e6e7f16cSDavid Xu #ifndef _COMPAT_FREEBSD32_SIGNAL_H_ 30e6e7f16cSDavid Xu #define _COMPAT_FREEBSD32_SIGNAL_H_ 31e6e7f16cSDavid Xu 32e6e7f16cSDavid Xu struct sigaltstack32 { 33cc5aa0a4SJohn Baldwin uint32_t ss_sp; /* signal stack base */ 34cc5aa0a4SJohn Baldwin uint32_t ss_size; /* signal stack length */ 35e6e7f16cSDavid Xu int ss_flags; /* SS_DISABLE and/or SS_ONSTACK */ 36e6e7f16cSDavid Xu }; 37e6e7f16cSDavid Xu 38b2dbdae9SBjoern A. Zeeb struct osigevent32 { 39b2dbdae9SBjoern A. Zeeb int sigev_notify; /* Notification type */ 40b2dbdae9SBjoern A. Zeeb union { 41b2dbdae9SBjoern A. Zeeb int __sigev_signo; /* Signal number */ 42b2dbdae9SBjoern A. Zeeb int __sigev_notify_kqueue; 43b2dbdae9SBjoern A. Zeeb } __sigev_u; 44b2dbdae9SBjoern A. Zeeb union sigval32 sigev_value; /* Signal value */ 45b2dbdae9SBjoern A. Zeeb }; 46b2dbdae9SBjoern A. Zeeb 47b2dbdae9SBjoern A. Zeeb struct sigevent32 { 48b2dbdae9SBjoern A. Zeeb int sigev_notify; /* Notification type */ 49b2dbdae9SBjoern A. Zeeb int sigev_signo; /* Signal number */ 50b2dbdae9SBjoern A. Zeeb union sigval32 sigev_value; /* Signal value */ 51b2dbdae9SBjoern A. Zeeb union { 52b2dbdae9SBjoern A. Zeeb __lwpid_t _threadid; 53b2dbdae9SBjoern A. Zeeb struct { 54b2dbdae9SBjoern A. Zeeb uint32_t _function; 55b2dbdae9SBjoern A. Zeeb uint32_t _attribute; 56b2dbdae9SBjoern A. Zeeb } _sigev_thread; 57d56e058aSDavid Xu unsigned short _kevent_flags; 58b2dbdae9SBjoern A. Zeeb uint32_t __spare__[8]; 59b2dbdae9SBjoern A. Zeeb } _sigev_un; 60b2dbdae9SBjoern A. Zeeb }; 61b2dbdae9SBjoern A. Zeeb 6297319989SKonstantin Belousov struct sigevent; 6397319989SKonstantin Belousov int convert_sigevent32(struct sigevent32 *sig32, struct sigevent *sig); 64*d060b420SBrooks Davis void siginfo_to_siginfo32(const siginfo_t *src, struct __siginfo32 *dst); 65e6e7f16cSDavid Xu 66e6e7f16cSDavid Xu #endif /* !_COMPAT_FREEBSD32_SIGNAL_H_ */ 67