File tree Expand file tree Collapse file tree 5 files changed +39
-2
lines changed Expand file tree Collapse file tree 5 files changed +39
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ set(TARGET_PUBLIC_HEADERS
2
2
libc.include.assert
3
3
libc.include.ctype
4
4
libc.include.string
5
+ libc.include.signal
5
6
libc.include.float
6
7
libc.include.stdint
7
8
libc.include.inttypes
Original file line number Diff line number Diff line change @@ -3,3 +3,9 @@ add_header(
3
3
HDR
4
4
time-macros.h
5
5
)
6
+
7
+ add_header (
8
+ signal_macros
9
+ HDR
10
+ signal-macros.h
11
+ )
Original file line number Diff line number Diff line change
1
+ //===-- Definition of GPU signal number macros ----------------------------===//
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_MACROS_GPU_SIGNAL_MACROS_H
10
+ #define LLVM_LIBC_MACROS_GPU_SIGNAL_MACROS_H
11
+
12
+ #define SIGINT 2
13
+ #define SIGILL 4
14
+ #define SIGABRT 6
15
+ #define SIGFPE 8
16
+ #define SIGSEGV 11
17
+ #define SIGTERM 15
18
+
19
+ #define SIG_DFL ((__sighandler_t)(0))
20
+ #define SIG_IGN ((__sighandler_t)(1))
21
+ #define SIG_ERR ((__sighandler_t)(-1))
22
+
23
+ // Max signal number
24
+ #define NSIG 64
25
+
26
+ #define __NSIGSET_WORDS NSIG
27
+
28
+ #endif // LLVM_LIBC_MACROS_GPU_SIGNAL_MACROS_H
Original file line number Diff line number Diff line change 9
9
#ifndef LLVM_LIBC_MACROS_SIGNAL_MACROS_H
10
10
#define LLVM_LIBC_MACROS_SIGNAL_MACROS_H
11
11
12
- #ifdef __linux__
12
+ #if defined( __linux__ )
13
13
#include "linux/signal-macros.h"
14
+ #elif defined(__NVPTX__ ) || defined(__AMDGPU__ )
15
+ #include "gpu/signal-macros.h"
14
16
#endif
15
17
16
18
#endif // LLVM_LIBC_MACROS_SIGNAL_MACROS_H
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ struct sigaction {
17
17
void (* sa_handler )(int );
18
18
void (* sa_sigaction )(int , siginfo_t * , void * );
19
19
};
20
- sigset_t sa_mask ;
20
+ struct sigset_t sa_mask ;
21
21
int sa_flags ;
22
22
#ifdef __linux__
23
23
// This field is present on linux for most targets.
You can’t perform that action at this time.
0 commit comments