Changes in kernel/arch/abs32le/include/interrupt.h [d32358f:598f90e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified kernel/arch/abs32le/include/interrupt.h ¶
rd32358f r598f90e 36 36 #define KERN_abs32le_INTERRUPT_H_ 37 37 38 #include <arch/types.h> 38 #include <typedefs.h> 39 #include <arch/istate.h> 39 40 40 41 #define IVT_ITEMS 0 … … 43 44 #define VECTOR_TLB_SHOOTDOWN_IPI 0 44 45 45 /*46 * On real hardware this stores the registers which47 * 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 interrupted58 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 84 46 #endif 85 47
Note:
See TracChangeset
for help on using the changeset viewer.