Tidied up the comments.

Call the Debugger from the diagnostic code if userret() finds itself
at an spl level other than SPL_0.
This commit is contained in:
mark 1996-10-15 01:04:27 +00:00
parent 04c5783fb7
commit ea88364d7f
1 changed files with 30 additions and 22 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ast.c,v 1.7 1996/10/13 03:05:43 christos Exp $ */
/* $NetBSD: ast.c,v 1.8 1996/10/15 01:04:27 mark Exp $ */
/*
* Copyright (c) 1994,1995 Mark Brinicombe
@ -69,11 +69,15 @@ userret(p, pc, oticks)
if ((GetCPSR() & PSR_MODE) != PSR_SVC32_MODE)
panic("userret called in non SVC mode !");
if (current_spl_level != SPL_0)
if (current_spl_level != SPL_0) {
printf("userret: spl level=%d on entry\n", current_spl_level);
#endif
#ifdef DDB
Debugger();
#endif /* DDB */
}
#endif /* DIAGNOSTIC */
/* take pending signals */
/* take pending signals */
while ((sig = (CURSIG(p))) != 0) {
postsig(sig);
@ -81,7 +85,7 @@ userret(p, pc, oticks)
p->p_priority = p->p_usrpri;
/*
/*
* Check for reschedule request
*/
@ -107,7 +111,7 @@ userret(p, pc, oticks)
}
}
/*
/*
* Not sure if this profiling bit is working yet ... Not been tested
*/
@ -119,9 +123,13 @@ userret(p, pc, oticks)
curpriority = p->p_priority;
#ifdef DIAGNOSTIC
if (current_spl_level != SPL_0)
if (current_spl_level != SPL_0) {
printf("userret: spl level=%d on exit\n", current_spl_level);
#endif
#ifdef DDB
Debugger();
#endif /* DDB */
}
#endif /* DIAGNOSTIC */
}
@ -154,13 +162,13 @@ ast(frame)
}
#ifdef VALIDATE_TRAPFRAME
validate_trapframe(frame, 3);
#endif
#endif /* VALIDATE_TRAPFRAME */
userret(p, frame->tf_pc, p->p_sticks);
#ifdef VALIDATE_TRAPFRAME
validate_trapframe(frame, 3);
#endif
#endif /* VALIDATE_TRAPFRAME */
}
/* End of ast.c */