1 // pa-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
12 #define JAVA_SIGNAL_H 1
15 #include <sys/syscall.h>
20 #define SIGNAL_HANDLER(_name) \
21 static void _Jv_##_name (int _dummy __attribute__ ((unused)), \
22 siginfo_t *_info __attribute__ ((__unused__)), \
23 void *arg __attribute__ ((__unused__)))
25 #define MAKE_THROW_FRAME(_exception)
30 struct sigaction act; \
31 act.sa_sigaction = _Jv_catch_segv; \
32 sigemptyset (&act.sa_mask); \
33 act.sa_flags = SA_SIGINFO; \
34 syscall (SYS_rt_sigaction, SIGSEGV, &act, NULL, _NSIG / 8); \
41 struct sigaction act; \
42 act.sa_sigaction = _Jv_catch_fpe; \
43 sigemptyset (&act.sa_mask); \
44 act.sa_flags = SA_SIGINFO; \
45 syscall (SYS_rt_sigaction, SIGFPE, &act, NULL, _NSIG / 8); \
49 #endif /* JAVA_SIGNAL_H */