Rev 534 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 534 | Rev 770 | ||
---|---|---|---|
Line 49... | Line 49... | ||
49 | * to context structure. |
49 | * to context structure. |
50 | * |
50 | * |
51 | * Note that call to context_restore() will return at the same |
51 | * Note that call to context_restore() will return at the same |
52 | * address as the corresponding call to context_save(). |
52 | * address as the corresponding call to context_save(). |
53 | * |
53 | * |
- | 54 | * This MUST be a macro, gcc -O0 does not inline functions even |
|
- | 55 | * if they are marked inline and context_save_arch must be called |
|
- | 56 | * from level <= that when context_restore is called. |
|
- | 57 | * |
|
54 | * @param c Context structure. |
58 | * @param c Context structure. |
55 | * |
59 | * |
56 | * @return context_save() returns 1, context_restore() returns 0. |
60 | * @return context_save() returns 1, context_restore() returns 0. |
57 | */ |
61 | */ |
58 | static inline int context_save(context_t *c) |
- | |
59 | { |
- | |
60 | return context_save_arch(c); |
62 | #define context_save(c) context_save_arch(c) |
61 | } |
- | |
62 | 63 | ||
63 | /** Restore register context. |
64 | /** Restore register context. |
64 | * |
65 | * |
65 | * Restore previously saved register context (including stack pointers) |
66 | * Restore previously saved register context (including stack pointers) |
66 | * from context structure. |
67 | * from context structure. |