In gcc/objc/: 2010-12-30 Nicola Pero <nicola.pero@meta-innovation.com>
[official-gcc.git] / libjava / include / solaris-signal.h
bloba936afe067f50104ca9b6bb711f8797746998b55
1 // sparc-signal.h - Catch runtime signals and turn them into exceptions.
3 /* Copyright (C) 1998, 1999, 2000, 2009 Free Software Foundation
5 This file is part of libgcj.
7 This software is copyrighted work licensed under the terms of the
8 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
9 details. */
11 #ifndef JAVA_SIGNAL_H
12 #define JAVA_SIGNAL_H 1
14 #include <signal.h>
16 #define HANDLE_SEGV 1
17 #define HANDLE_FPE 1
19 #define SIGNAL_HANDLER(_name) \
20 static void _Jv_##_name (int, \
21 siginfo_t *_si __attribute__ ((__unused__)), \
22 void *_uc __attribute__ ((__unused__)))
24 #define MAKE_THROW_FRAME(_exception)
26 #define INIT_SEGV \
27 do \
28 { \
29 struct sigaction act; \
30 act.sa_sigaction = _Jv_catch_segv; \
31 act.sa_flags = SA_SIGINFO | SA_NODEFER; \
32 sigemptyset (&act.sa_mask); \
33 sigaction (SIGSEGV, &act, NULL); \
34 } \
35 while (0)
37 #define INIT_FPE \
38 do \
39 { \
40 struct sigaction act; \
41 act.sa_sigaction = _Jv_catch_fpe; \
42 act.sa_flags = SA_SIGINFO | SA_NODEFER; \
43 sigemptyset (&act.sa_mask); \
44 sigaction (SIGFPE, &act, NULL); \
45 } \
46 while (0)
48 #endif /* JAVA_SIGNAL_H */