Changes in kernel/arch/abs32le/include/interrupt.h [598f90e:d32358f] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/abs32le/include/interrupt.h
r598f90e rd32358f 36 36 #define KERN_abs32le_INTERRUPT_H_ 37 37 38 #include <typedefs.h> 39 #include <arch/istate.h> 38 #include <arch/types.h> 40 39 41 40 #define IVT_ITEMS 0 … … 44 43 #define VECTOR_TLB_SHOOTDOWN_IPI 0 45 44 45 /* 46 * On real hardware this stores the registers which 47 * need to be preserved during interupts. 48 */ 49 typedef struct istate { 50 uintptr_t ip; 51 uintptr_t fp; 52 uint32_t stack[]; 53 } istate_t; 54 55 static inline int istate_from_uspace(istate_t *istate) 56 { 57 /* On real hardware this checks whether the interrupted 58 context originated from user space. */ 59 60 return !(istate->ip & 0x80000000); 61 } 62 63 static inline void istate_set_retaddr(istate_t *istate, uintptr_t retaddr) 64 { 65 /* On real hardware this sets the instruction pointer. */ 66 67 istate->ip = retaddr; 68 } 69 70 static inline unative_t istate_get_pc(istate_t *istate) 71 { 72 /* On real hardware this returns the instruction pointer. */ 73 74 return istate->ip; 75 } 76 77 static inline unative_t istate_get_fp(istate_t *istate) 78 { 79 /* On real hardware this returns the frame pointer. */ 80 81 return istate->fp; 82 } 83 46 84 #endif 47 85
Note:
See TracChangeset
for help on using the changeset viewer.