svn commit: r283870 - head/sys/amd64/amd64
Dimitry Andric
dim at FreeBSD.org
Mon Jun 1 06:50:40 UTC 2015
Author: dim
Date: Mon Jun 1 06:50:39 2015
New Revision: 283870
URL: https://svnweb.freebsd.org/changeset/base/283870
Log:
Remove unneeded NULL checks in amd64's trap_fatal().
Since td_name is an array member of struct thread, it can never be NULL,
so the check can be removed. In addition, curproc can never be NULL,
so remove the if statement, and splice the two printfs() together.
While here, remove the u_long cast, and use the correct printf format
specifier curproc->p_pid.
Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D2695
Modified:
head/sys/amd64/amd64/trap.c
Modified: head/sys/amd64/amd64/trap.c
==============================================================================
--- head/sys/amd64/amd64/trap.c Mon Jun 1 06:14:17 2015 (r283869)
+++ head/sys/amd64/amd64/trap.c Mon Jun 1 06:50:39 2015 (r283870)
@@ -840,14 +840,8 @@ trap_fatal(frame, eva)
if (frame->tf_rflags & PSL_RF)
printf("resume, ");
printf("IOPL = %ld\n", (frame->tf_rflags & PSL_IOPL) >> 12);
- printf("current process = ");
- if (curproc) {
- printf("%lu (%s)\n",
- (u_long)curproc->p_pid, curthread->td_name ?
- curthread->td_name : "");
- } else {
- printf("Idle\n");
- }
+ printf("current process = %d (%s)\n",
+ curproc->p_pid, curthread->td_name);
#ifdef KDB
if (debugger_on_panic || kdb_active)
More information about the svn-src-all
mailing list