示例#1
0
文件: cswitch.c 项目: DIKU-EDU/kudos
void _context_enter_userland(context_t *cxt)
{
  /* Set userland bit and enable interrupts before entering userland. */
  cxt->status = cxt->status | USERLAND_ENABLE_BIT;
  cxt->status = cxt->status | INTERRUPT_MASK_ALL;
  cxt->status = cxt->status | INTERRUPT_MASK_MASTER;
  _cswitch_to_userland(cxt);
}
示例#2
0
文件: thread.c 项目: Amr116/Buenos
void thread_goto_userland(context_t *usercontext)
{
    /* Set userland bit and enable interrupts before entering userland. */
    usercontext->status = usercontext->status | USERLAND_ENABLE_BIT;
    usercontext->status = usercontext->status | INTERRUPT_MASK_ALL;
    usercontext->status = usercontext->status | INTERRUPT_MASK_MASTER;
    _cswitch_to_userland(usercontext);
    
    KERNEL_PANIC("Userland entering returned for unknown reason.");
}