Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
sigcontext.h File Reference

Go to the source code of this file.

Macros

#define DSISR_WRITE   0x02000000
 
#define SC_FAULT_ADDR(sc)
 
#define SC_FAULT_WRITE(sc)
 
#define SC_IP(sc)   ((sc)->regs->nip)
 
#define SC_SP(sc)   ((sc)->regs->gpr[1])
 
#define SEGV_IS_FIXABLE(sc)   (1)
 

Macro Definition Documentation

#define DSISR_WRITE   0x02000000

Definition at line 9 of file sigcontext.h.

#define SC_FAULT_ADDR (   sc)
Value:
({ \
struct sigcontext *_sc = (sc); \
long retval = -1; \
switch (_sc->regs->trap) { \
case 0x300: \
/* data exception */ \
retval = _sc->regs->dar; \
break; \
case 0x400: \
/* instruction exception */ \
retval = _sc->regs->nip; \
break; \
default: \
panic("SC_FAULT_ADDR: unhandled trap type\n"); \
} \
retval; \
})

Definition at line 11 of file sigcontext.h.

#define SC_FAULT_WRITE (   sc)
Value:
({ \
struct sigcontext *_sc = (sc); \
long retval = -1; \
switch (_sc->regs->trap) { \
case 0x300: \
/* data exception */ \
retval = !!(_sc->regs->dsisr & DSISR_WRITE); \
break; \
case 0x400: \
/* instruction exception: not a write */ \
retval = 0; \
break; \
default: \
panic("SC_FAULT_ADDR: unhandled trap type\n"); \
} \
retval; \
})

Definition at line 29 of file sigcontext.h.

#define SC_IP (   sc)    ((sc)->regs->nip)

Definition at line 47 of file sigcontext.h.

#define SC_SP (   sc)    ((sc)->regs->gpr[1])

Definition at line 48 of file sigcontext.h.

#define SEGV_IS_FIXABLE (   sc)    (1)

Definition at line 49 of file sigcontext.h.