Changes in kernel/generic/include/context.h [b1d3c36:b1c21c2] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/context.h
rb1d3c36 rb1c21c2 27 27 */ 28 28 29 /** @addtogroup generic 29 /** @addtogroup generic 30 30 * @{ 31 31 */ … … 39 39 #include <arch/context.h> 40 40 41 #define context_set_generic(ctx, _pc, stack, size) \42 (ctx)->pc = (uintptr_t) (_pc); \43 (ctx)->sp = ((uintptr_t) (stack)) + (size) - SP_DELTA;44 41 45 extern int context_save_arch(context_t *ctx) __attribute__((returns_twice)); 46 extern void context_restore_arch(context_t *ctx) __attribute__((noreturn)); 42 #ifndef context_set 43 #define context_set(c, _pc, stack, size) \ 44 (c)->pc = (uintptr_t) (_pc); \ 45 (c)->sp = ((uintptr_t) (stack)) + (size) - SP_DELTA; 46 #endif /* context_set */ 47 48 extern int context_save_arch(context_t *c) __attribute__ ((returns_twice)); 49 extern void context_restore_arch(context_t *c) __attribute__ ((noreturn)); 47 50 48 51 /** Save register context. … … 70 73 * saved like that would therefore lead to a disaster. 71 74 * 72 * @param c txContext structure.75 * @param c Context structure. 73 76 * 74 * @return context_save() returns 1, context_restore() returns 0. 75 * 77 * @return context_save() returns 1, context_restore() returns 0. 76 78 */ 77 #define context_save(c tx) context_save_arch(ctx)79 #define context_save(c) context_save_arch(c) 78 80 79 81 /** Restore register context. … … 86 88 * being return value. 87 89 * 88 * @param c txContext structure.90 * @param c Context structure. 89 91 */ 90 static inline void context_restore(context_t *c tx)92 static inline void context_restore(context_t *c) 91 93 { 92 context_restore_arch(c tx);94 context_restore_arch(c); 93 95 } 94 96
Note:
See TracChangeset
for help on using the changeset viewer.