-/* $OpenBSD: trap.c,v 1.73 2014/05/10 05:33:00 guenther Exp $ */
+/* $OpenBSD: trap.c,v 1.74 2014/05/11 00:12:43 guenther Exp $ */
/* $NetBSD: trap.c,v 1.52 2000/05/24 16:48:33 thorpej Exp $ */
/*-
panic("ast and not user");
#endif
+ atomic_add_int(&uvmexp.softs, 1);
mi_ast(p, ci->ci_want_resched);
/* Do any deferred user pmap operations. */
-/* $OpenBSD: trap.c,v 1.38 2014/05/10 05:33:00 guenther Exp $ */
+/* $OpenBSD: trap.c,v 1.39 2014/05/11 00:12:43 guenther Exp $ */
/* $NetBSD: trap.c,v 1.2 2003/05/04 23:51:56 fvdl Exp $ */
/*-
goto out;
case T_ASTFLT|T_USER: /* Allow process switch */
+ uvmexp.softs++;
mi_ast(p, curcpu()->ci_want_resched);
goto out;
-/* $OpenBSD: ast.c,v 1.11 2014/05/10 05:33:00 guenther Exp $ */
+/* $OpenBSD: ast.c,v 1.12 2014/05/11 00:12:44 guenther Exp $ */
/* $NetBSD: ast.c,v 1.6 2003/10/31 16:44:34 cl Exp $ */
/*
panic("ast: no pcb!");
#endif
+ uvmexp.softs++;
mi_ast(p, want_resched);
userret(p);
}
-/* $OpenBSD: trap.c,v 1.133 2014/05/10 21:58:56 deraadt Exp $ */
+/* $OpenBSD: trap.c,v 1.134 2014/05/11 00:12:44 guenther Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
{
if (p->p_md.md_astpending) {
p->p_md.md_astpending = 0;
+ uvmexp.softs++;
mi_ast(p, curcpu()->ci_want_resched);
}
-/* $OpenBSD: trap.c,v 1.38 2014/05/11 00:05:38 guenther Exp $ */
+/* $OpenBSD: trap.c,v 1.39 2014/05/11 00:12:44 guenther Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
{
if (astpending) {
astpending = 0;
+ uvmexp.softs++;
mi_ast(p, want_resched);
}
}
-/* $OpenBSD: trap.c,v 1.115 2014/05/10 05:33:00 guenther Exp $ */
+/* $OpenBSD: trap.c,v 1.116 2014/05/11 00:12:44 guenther Exp $ */
/* $NetBSD: trap.c,v 1.95 1996/05/05 06:50:02 mycroft Exp $ */
/*-
goto out;
case T_ASTFLT|T_USER: /* Allow process switch */
+ uvmexp.softs++;
mi_ast(p, want_resched);
goto out;
-/* $OpenBSD: trap.c,v 1.92 2014/05/10 05:33:00 guenther Exp $ */
+/* $OpenBSD: trap.c,v 1.93 2014/05/11 00:12:44 guenther Exp $ */
/*
* Copyright (c) 2004, Miodrag Vallat.
* Copyright (c) 1998 Steve Murphree, Jr.
p->p_md.md_astpending = 0;
+ uvmexp.softs++;
mi_ast(p, ci->ci_want_resched);
userret(p);
}
-/* $OpenBSD: trap.c,v 1.96 2014/05/11 00:05:38 guenther Exp $ */
+/* $OpenBSD: trap.c,v 1.97 2014/05/11 00:12:44 guenther Exp $ */
/*
* Copyright (c) 1988 University of Utah.
p->p_md.md_astpending = 0;
+ atomic_add_int(&uvmexp.softs, 1);
mi_ast(p, ci->ci_want_resched);
userret(p);
}
-/* $OpenBSD: trap.c,v 1.99 2014/05/10 16:48:36 deraadt Exp $ */
+/* $OpenBSD: trap.c,v 1.100 2014/05/11 00:12:44 guenther Exp $ */
/* $NetBSD: trap.c,v 1.3 1996/10/13 03:31:37 christos Exp $ */
/*
case EXC_AST|EXC_USER:
p->p_md.md_astpending = 0; /* we are about to do it */
+ uvmexp.softs++;
mi_ast(p, ci->ci_want_resched);
break;
}
-/* $OpenBSD: trap.c,v 1.28 2014/05/10 16:56:23 deraadt Exp $ */
+/* $OpenBSD: trap.c,v 1.29 2014/05/11 00:12:44 guenther Exp $ */
/* $NetBSD: exception.c,v 1.32 2006/09/04 23:57:52 uwe Exp $ */
/* $NetBSD: syscall.c,v 1.6 2006/03/07 07:21:50 thorpej Exp $ */
while (p->p_md.md_astpending) {
p->p_md.md_astpending = 0;
refreshcreds(p);
+ uvmexp.softs++;
mi_ast(p, want_resched);
userret(p);
}
-/* $OpenBSD: trap.c,v 1.20 2014/05/10 05:33:00 guenther Exp $ */
+/* $OpenBSD: trap.c,v 1.21 2014/05/11 00:12:44 guenther Exp $ */
/* OpenBSD: trap.c,v 1.42 2004/12/06 20:12:25 miod Exp */
/*
case T_AST:
want_ast = 0;
+ uvmexp.softs++;
mi_ast(p, want_resched);
break;
-/* $OpenBSD: trap.c,v 1.67 2014/05/10 05:33:00 guenther Exp $ */
+/* $OpenBSD: trap.c,v 1.68 2014/05/11 00:12:44 guenther Exp $ */
/* $NetBSD: trap.c,v 1.58 1997/09/12 08:55:01 pk Exp $ */
/*
case T_AST:
want_ast = 0;
+ uvmexp.softs++;
mi_ast(p, want_resched);
break;
-/* $OpenBSD: trap.c,v 1.83 2014/05/10 12:29:58 kettenis Exp $ */
+/* $OpenBSD: trap.c,v 1.84 2014/05/11 00:12:44 guenther Exp $ */
/* $NetBSD: trap.c,v 1.73 2001/08/09 01:03:01 eeh Exp $ */
/*
case T_AST:
p->p_md.md_astpending = 0;
+ uvmexp.softs++;
mi_ast(p, curcpu()->ci_want_resched);
break;
-/* $OpenBSD: trap.c,v 1.52 2014/05/10 05:33:00 guenther Exp $ */
+/* $OpenBSD: trap.c,v 1.53 2014/05/11 00:12:44 guenther Exp $ */
/* $NetBSD: trap.c,v 1.47 1999/08/21 19:26:20 matt Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
case T_ASTFLT|T_USER:
mtpr(AST_NO,PR_ASTLVL);
trapsig = 0;
+ uvmexp.softs++;
mi_ast(p, want_resched);
break;
-/* $OpenBSD: syscall_mi.h,v 1.4 2014/05/10 05:33:00 guenther Exp $ */
+/* $OpenBSD: syscall_mi.h,v 1.5 2014/05/11 00:12:44 guenther Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
/*
* Do the specific processing necessary for an AST
*/
-static void
+static inline void
mi_ast(struct proc *p, int resched)
{
- uvmexp.softs++;
-
if (p->p_flag & P_OWEUPC) {
KERNEL_LOCK();
ADDUPROF(p);