From owner-svn-src-all@FreeBSD.ORG Fri Feb 27 12:50:26 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44A6F106566B; Fri, 27 Feb 2009 12:50:26 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 33C4A8FC15; Fri, 27 Feb 2009 12:50:26 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1RCoQVY070750; Fri, 27 Feb 2009 12:50:26 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1RCoQkC070749; Fri, 27 Feb 2009 12:50:26 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200902271250.n1RCoQkC070749@svn.freebsd.org> From: Ed Schouten Date: Fri, 27 Feb 2009 12:50:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189102 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Feb 2009 12:50:26 -0000 Author: ed Date: Fri Feb 27 12:50:25 2009 New Revision: 189102 URL: http://svn.freebsd.org/changeset/base/189102 Log: Revert previous commit to subr_prf.c and make it more tidy. As mentioned by bz and bde, the change I made wasn't the proper way to fix. Inspired by bde's patch, perform some small cleanups to uprintf(). Reviewed by: bz Modified: head/sys/kern/subr_prf.c Modified: head/sys/kern/subr_prf.c ============================================================================== --- head/sys/kern/subr_prf.c Fri Feb 27 12:18:17 2009 (r189101) +++ head/sys/kern/subr_prf.c Fri Feb 27 12:50:25 2009 (r189102) @@ -127,16 +127,18 @@ tablefull(const char *tab) int uprintf(const char *fmt, ...) { - struct thread *td = curthread; - struct proc *p = td->td_proc; va_list ap; struct putchar_arg pca; + struct proc *p; + struct thread *td; int retval; - if (td == NULL || TD_IS_IDLETHREAD(td)) + td = curthread; + if (TD_IS_IDLETHREAD(td)) return (0); sx_slock(&proctree_lock); + p = td->td_proc; PROC_LOCK(p); if ((p->p_flag & P_CONTROLT) == 0) { PROC_UNLOCK(p);