|
Last change
on this file since 3020 was 2, checked in by bird, 23 years ago |
|
Initial revision
|
-
Property cvs2svn:cvs-rev
set to
1.1
-
Property svn:eol-style
set to
native
-
Property svn:executable
set to
*
|
|
File size:
1.1 KB
|
| Line | |
|---|
| 1 | // default-signal.h - Catch runtime signals and turn them into exceptions.
|
|---|
| 2 |
|
|---|
| 3 | /* Copyright (C) 1998, 1999, 2000 Free Software Foundation
|
|---|
| 4 |
|
|---|
| 5 | This file is part of libgcj.
|
|---|
| 6 |
|
|---|
| 7 | This software is copyrighted work licensed under the terms of the
|
|---|
| 8 | Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
|
|---|
| 9 | details. */
|
|---|
| 10 |
|
|---|
| 11 | #ifndef JAVA_SIGNAL_H
|
|---|
| 12 | #define JAVA_SIGNAL_H 1
|
|---|
| 13 |
|
|---|
| 14 | #ifdef SJLJ_EXCEPTIONS
|
|---|
| 15 |
|
|---|
| 16 | #define HANDLE_SEGV 1
|
|---|
| 17 | #define HANDLE_FPE 1
|
|---|
| 18 |
|
|---|
| 19 | #include <signal.h>
|
|---|
| 20 |
|
|---|
| 21 | #define SIGNAL_HANDLER(_name) \
|
|---|
| 22 | static void _name (int _dummy)
|
|---|
| 23 |
|
|---|
| 24 | #define INIT_SEGV \
|
|---|
| 25 | do \
|
|---|
| 26 | { \
|
|---|
| 27 | nullp = new java::lang::NullPointerException (); \
|
|---|
| 28 | signal (SIGSEGV, catch_segv); \
|
|---|
| 29 | } \
|
|---|
| 30 | while (0)
|
|---|
| 31 |
|
|---|
| 32 | #define INIT_FPE \
|
|---|
| 33 | do \
|
|---|
| 34 | { \
|
|---|
| 35 | arithexception = new java::lang::ArithmeticException \
|
|---|
| 36 | (JvNewStringLatin1 ("/ by zero")); \
|
|---|
| 37 | signal (SIGFPE, catch_fpe); \
|
|---|
| 38 | } \
|
|---|
| 39 | while (0)
|
|---|
| 40 |
|
|---|
| 41 | #define MAKE_THROW_FRAME(_exception) do {} while (0)
|
|---|
| 42 |
|
|---|
| 43 | #else /* SJLJ_EXCEPTIONS */
|
|---|
| 44 |
|
|---|
| 45 | #undef HANDLE_SEGV
|
|---|
| 46 | #undef HANDLE_FPE
|
|---|
| 47 |
|
|---|
| 48 | #define INIT_SEGV do {} while (0)
|
|---|
| 49 | #define INIT_FPE do {} while (0)
|
|---|
| 50 |
|
|---|
| 51 | #endif /* SJLJ_EXCEPTIONS */
|
|---|
| 52 |
|
|---|
| 53 | #endif /* JAVA_SIGNAL_H */
|
|---|
| 54 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.