Changeset 89c57b6 in mainline for kernel/arch/abs32le/include/interrupt.h
- Timestamp:
- 2011-04-13T14:45:41Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 88634420
- Parents:
- cefb126 (diff), 17279ead (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/abs32le/include/interrupt.h
rcefb126 r89c57b6 37 37 38 38 #include <typedefs.h> 39 #include < verify.h>39 #include <arch/istate.h> 40 40 41 41 #define IVT_ITEMS 0 … … 44 44 #define VECTOR_TLB_SHOOTDOWN_IPI 0 45 45 46 /*47 * On real hardware this stores the registers which48 * need to be preserved during interupts.49 */50 typedef struct istate {51 uintptr_t ip;52 uintptr_t fp;53 uint32_t stack[];54 } istate_t;55 56 static inline int istate_from_uspace(istate_t *istate)57 REQUIRES_EXTENT_MUTABLE(istate)58 {59 /* On real hardware this checks whether the interrupted60 context originated from user space. */61 62 return !(istate->ip & 0x80000000);63 }64 65 static inline void istate_set_retaddr(istate_t *istate, uintptr_t retaddr)66 WRITES(&istate->ip)67 {68 /* On real hardware this sets the instruction pointer. */69 70 istate->ip = retaddr;71 }72 73 static inline unative_t istate_get_pc(istate_t *istate)74 REQUIRES_EXTENT_MUTABLE(istate)75 {76 /* On real hardware this returns the instruction pointer. */77 78 return istate->ip;79 }80 81 static inline unative_t istate_get_fp(istate_t *istate)82 REQUIRES_EXTENT_MUTABLE(istate)83 {84 /* On real hardware this returns the frame pointer. */85 86 return istate->fp;87 }88 89 46 #endif 90 47
Note:
See TracChangeset
for help on using the changeset viewer.