Subversion Repositories HelenOS-historic

Rev

Rev 1053 | Rev 1138 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1053 Rev 1137
Line 45... Line 45...
45
 
45
 
46
#ifdef context_set
46
#ifdef context_set
47
#undef context_set
47
#undef context_set
48
#endif
48
#endif
49
 
49
 
-
 
50
/*RSE stack should begin under bottom of stack @ kernel*/
50
#define context_set(c, _pc, stack, size)                                \
51
#define context_set(c, _pc, stack, size)                                \
51
    (c)->pc = (__address) _pc;                                  \
52
    (c)->pc = (__address) _pc;                                  \
52
    (c)->bsp = ((__address) stack) + ALIGN_UP(sizeof(the_t), REGISTER_STACK_ALIGNMENT);     \
53
    (c)->bsp = ((__address) stack) + ALIGN_UP((size), STACK_ALIGNMENT) ;    \
53
    (c)->ar_pfs &= PFM_MASK;                                    \
54
    (c)->ar_pfs &= PFM_MASK;                                    \
54
    (c)->sp = ((__address) stack) + ALIGN_UP((size), STACK_ALIGNMENT) - SP_DELTA;
55
    (c)->sp = ((__address) stack) + ALIGN_UP((size), STACK_ALIGNMENT) - SP_DELTA;
55
 
56
 
56
/*
57
/*
57
 * Only save registers that must be preserved across
58
 * Only save registers that must be preserved across