OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [include/] [mips-signal.h] - Blame information for rev 867

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 757 jeremybenn
// mips-signal.h - Catch runtime signals and turn them into exceptions
2
// on an mips based Linux system. 
3
 
4
/* Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2006
5
   Free Software Foundation
6
 
7
   This file is part of libgcj.
8
 
9
This software is copyrighted work licensed under the terms of the
10
Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
11
details.  */
12
 
13
/* Adapted from sparc-signal.h and powerpc-signal.h
14
   by David Daney <ddaney@avtrex.com> */
15
 
16
#ifndef JAVA_SIGNAL_H
17
#define JAVA_SIGNAL_H 1
18
 
19
#include <signal.h>
20
#include <unistd.h>
21
 
22
#define HANDLE_SEGV 1
23
#define HANDLE_FPE 1
24
 
25
#define SIGNAL_HANDLER(_name) \
26
static void _name (int _dummy __attribute__ ((__unused__)), \
27
                   siginfo_t *_info __attribute__ ((__unused__)), \
28
                   void *_arg __attribute__ ((__unused__)))
29
 
30
#define MAKE_THROW_FRAME(_exception)
31
 
32
#define _INIT_SIG_HANDLER(_SIG, _ACTION)     \
33
do                                           \
34
  {                                          \
35
    struct sigaction act;                    \
36
    act.sa_sigaction = _ACTION;              \
37
    act.sa_flags = SA_SIGINFO | SA_NODEFER;  \
38
    sigemptyset (&act.sa_mask);              \
39
    sigaction(_SIG, &act, NULL);             \
40
  }                                          \
41
while (0)
42
 
43
#define INIT_SEGV _INIT_SIG_HANDLER (SIGSEGV, catch_segv)
44
 
45
#define INIT_FPE _INIT_SIG_HANDLER (SIGFPE, catch_fpe)
46
#undef HANDLE_DIVIDE_OVERFLOW
47
 
48
#endif /* JAVA_SIGNAL_H */
49
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.