1 //===-- Definition of struct __sigaction ----------------------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #ifndef LLVM_LIBC_TYPES_STRUCT_SIGACTION_H 10 #define LLVM_LIBC_TYPES_STRUCT_SIGACTION_H 11 12 #include "siginfo_t.h" 13 #include "sigset_t.h" 14 15 struct sigaction { 16 union { 17 void (*sa_handler)(int); 18 void (*sa_sigaction)(int, siginfo_t *, void *); 19 }; 20 sigset_t sa_mask; 21 int sa_flags; 22 #ifdef __linux__ 23 // This field is present on linux for most targets. 24 void (*sa_restorer)(void); 25 #endif 26 }; 27 28 typedef void (*__sighandler_t)(int); 29 30 #endif // LLVM_LIBC_TYPES_STRUCT_SIGACTION_H 31