signal.h (1566B)
1 /* -*-comment-start: "//";comment-end:""-*- 2 * GNU Mes --- Maxwell Equations of Software 3 * Copyright © 2024 Ekaitz Zarraga <ekaitz@elenq.tech> 4 * Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org> 5 * 6 * This file is part of GNU Mes. 7 * 8 * GNU Mes is free software; you can redistribute it and/or modify it 9 * under the terms of the GNU General Public License as published by 10 * the Free Software Foundation; either version 3 of the License, or (at 11 * your option) any later version. 12 * 13 * GNU Mes is distributed in the hope that it will be useful, but 14 * WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. 20 */ 21 22 // Taken from musl libc (4a16ddf5) 23 24 typedef int greg_t; 25 typedef int gregset_t[18]; 26 typedef struct sigcontext 27 { 28 unsigned long trap_no, error_code, oldmask; 29 unsigned long arm_r0, arm_r1, arm_r2, arm_r3; 30 unsigned long arm_r4, arm_r5, arm_r6, arm_r7; 31 unsigned long arm_r8, arm_r9, arm_r10, arm_fp; 32 unsigned long arm_ip, arm_sp, arm_lr, arm_pc; 33 unsigned long arm_cpsr, fault_address; 34 } mcontext_t; 35 36 struct sigaltstack 37 { 38 void *ss_sp; 39 int ss_flags; 40 size_t ss_size; 41 }; 42 43 typedef struct __ucontext 44 { 45 unsigned long uc_flags; 46 struct __ucontext *uc_link; 47 stack_t uc_stack; 48 mcontext_t uc_mcontext; 49 sigset_t uc_sigmask; 50 unsigned long long uc_regspace[64]; 51 } ucontext_t;