svn commit: r189102 - head/sys/kern
Ed Schouten
ed at FreeBSD.org
Fri Feb 27 04:50:26 PST 2009
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);
More information about the svn-src-head
mailing list