示例#1
0
/*
 * Handle an AST for the current process.
 */
void
ast()
{
	struct cpu_info *ci = curcpu();
	struct proc *p = ci->ci_curproc;

	p->p_md.md_astpending = 0;

	atomic_add_int(&uvmexp.softs, 1);
	mi_ast(p, ci->ci_want_resched);
	userret(p);
}
示例#2
0
void
ast(struct trapframe *tf)
{
    struct proc *p = curproc;

    /* Interrupts were restored by exception_exit. */

    uvmexp.traps++;

#ifdef DEBUG
    if (p == NULL)
        panic("ast: no curproc!");
    if (&p->p_addr->u_pcb == 0)
        panic("ast: no pcb!");
#endif

    uvmexp.softs++;
    mi_ast(p, want_resched);
    userret(p);
}