Home | History | Annotate | Download | only in md

Lines Matching refs:CONTEXT

72  * Mike Patnode indicated that it is possibly safe now to use context-switching
75 * will save us the getcontext/setcontext system calls at each context switch.
95 #define _MD_GET_SP(_t) (_t)->md.context.uc_mcontext.gpregs[CXT_SP]
99 #define CONTEXT(_thread) (&(_thread)->md.context)
107 _PR_CONTEXT_TYPE context;
182 ** Initialize the thread context preparing it to execute "_main()"
183 ** - get a nice, fresh context
190 _GETCONTEXT(CONTEXT(thread)); \
192 CONTEXT(thread)->uc_stack.ss_sp = thread->stack->stackBottom; \
193 CONTEXT(thread)->uc_stack.ss_size = thread->stack->stackSize; \
194 CONTEXT(thread)->uc_mcontext.gpregs[CXT_SP] = ((unsigned long)_sp - 128) & 0xfffffff8; \
195 CONTEXT(thread)->uc_mcontext.gpregs[CXT_T9] = _main; \
196 CONTEXT(thread)->uc_mcontext.gpregs[CXT_EPC] = _main; \
197 CONTEXT(thread)->uc_mcontext.gpregs[CXT_RA] = 0; \
202 ** Save current context as it is scheduled away
206 if (!_GETCONTEXT(CONTEXT(_thread))) { \
214 ** Restore a thread context, saved by _MD_SWITCH_CONTEXT or set up
220 ** setting a context got with getcontext() appears to
229 ucontext_t *uc = CONTEXT(_thread); \