OSDN Git Service

* ada/acats/run_acats (which): New function.
[pf3gnuchains/gcc-fork.git] / libjava / include / hppa-signal.h
1 /* hppa-signal.h - Catch runtime signals and turn them into exceptions,
2    on a HP-UX 11 PA system.  */
3
4 /* Copyright (C) 2006, 2009  Free Software Foundation
5
6    This file is part of libgcj.
7
8 This software is copyrighted work licensed under the terms of the
9 Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
10 details.  */
11
12 #ifndef JAVA_SIGNAL_H
13 #define JAVA_SIGNAL_H 1
14
15 #include <signal.h>
16
17 #define HANDLE_SEGV 1
18 #define HANDLE_FPE 1
19
20 #define SIGNAL_HANDLER(_name)                                           \
21 static void  _name (int _dummy __attribute__ ((unused)),                \
22                     siginfo_t *_info __attribute__ ((__unused__)),      \
23                     void *arg __attribute__ ((__unused__)))
24
25 #define MAKE_THROW_FRAME(_exception)
26
27 #define INIT_SEGV                               \
28 do                                              \
29   {                                             \
30     struct sigaction sa;                        \
31     sa.sa_sigaction = catch_segv;               \
32     sigemptyset (&sa.sa_mask);                  \
33     sa.sa_flags = SA_SIGINFO | SA_NODEFER;      \
34     sigaction (SIGSEGV, &sa, NULL);             \
35   }                                             \
36 while (0)
37
38 #define INIT_FPE                                \
39 do                                              \
40   {                                             \
41     struct sigaction sa;                        \
42     sa.sa_sigaction = catch_fpe;                \
43     sigemptyset (&sa.sa_mask);                  \
44     sa.sa_flags = SA_SIGINFO | SA_NODEFER;      \
45     sigaction (SIGFPE, &sa, NULL);              \
46   }                                             \
47 while (0)
48
49 #endif /* JAVA_SIGNAL_H */