Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Remove debugging.



details:   https://anonhg.NetBSD.org/src/rev/625fd1d60c85
branches:  trunk
changeset: 779659:625fd1d60c85
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jun 09 02:55:32 2012 +0000

description:
Remove debugging.

diffstat:

 sys/kern/kern_lwp.c     |  15 +++++----------
 sys/kern/kern_prot.c    |   8 +++-----
 sys/kern/kern_uidinfo.c |   9 ++-------
 3 files changed, 10 insertions(+), 22 deletions(-)

diffs (103 lines):

diff -r de1a7105a37b -r 625fd1d60c85 sys/kern/kern_lwp.c
--- a/sys/kern/kern_lwp.c       Sat Jun 09 02:50:43 2012 +0000
+++ b/sys/kern/kern_lwp.c       Sat Jun 09 02:55:32 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_lwp.c,v 1.169 2012/06/09 02:31:14 christos Exp $  */
+/*     $NetBSD: kern_lwp.c,v 1.170 2012/06/09 02:55:32 christos Exp $  */
 
 /*-
  * Copyright (c) 2001, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -211,7 +211,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.169 2012/06/09 02:31:14 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.170 2012/06/09 02:55:32 christos Exp $");
 
 #include "opt_ddb.h"
 #include "opt_lockdebug.h"
@@ -735,11 +735,8 @@
                            KAUTH_ARG(KAUTH_REQ_PROCESS_RLIMIT_BYPASS),
                            &p2->p_rlimit[RLIMIT_NTHR], KAUTH_ARG(RLIMIT_NTHR))
                            != 0) {
-                               if ((count = chglwpcnt(uid, -1)) < 0)
-                                       printf("%s, %d: %s, %d, %d\n", __FILE__,
-                                           __LINE__, l1->l_proc->p_comm,
-                                           l1->l_proc->p_pid, count);
-                               // return EAGAIN;
+                               (void)chglwpcnt(uid, -1);
+                               return EAGAIN;
                        }
                }
        }
@@ -1110,9 +1107,7 @@
        KASSERT(last || mutex_owned(p->p_lock));
 
        if (p != &proc0 && p->p_nlwps != 1)
-               if (chglwpcnt(kauth_cred_getuid(l->l_cred), -1) < 0)
-                       printf("%s, %d: %d, %s\n", __FILE__, __LINE__,
-                           p->p_pid, p->p_comm);
+               (void)chglwpcnt(kauth_cred_getuid(l->l_cred), -1);
        /*
         * If this was not the last LWP in the process, then adjust
         * counters and unlock.
diff -r de1a7105a37b -r 625fd1d60c85 sys/kern/kern_prot.c
--- a/sys/kern/kern_prot.c      Sat Jun 09 02:50:43 2012 +0000
+++ b/sys/kern/kern_prot.c      Sat Jun 09 02:55:32 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_prot.c,v 1.115 2012/06/09 02:31:15 christos Exp $ */
+/*     $NetBSD: kern_prot.c,v 1.116 2012/06/09 02:55:32 christos Exp $ */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1990, 1991, 1993
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_prot.c,v 1.115 2012/06/09 02:31:15 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_prot.c,v 1.116 2012/06/09 02:55:32 christos Exp $");
 
 #include "opt_compat_43.h"
 
@@ -349,9 +349,7 @@
 
                /* The first lwp of a process is not counted */
                int nlwps = p->p_nlwps - 1;
-               if (chglwpcnt(kauth_cred_getuid(ncred), -nlwps) < 0)
-                   printf("%s, %d: %d, %s %d\n", __FILE__, __LINE__,
-                       p->p_pid, p->p_comm, nlwps);
+               (void)chglwpcnt(kauth_cred_getuid(ncred), -nlwps);
                (void)chglwpcnt(r, nlwps);
 
                kauth_cred_setuid(ncred, r);
diff -r de1a7105a37b -r 625fd1d60c85 sys/kern/kern_uidinfo.c
--- a/sys/kern/kern_uidinfo.c   Sat Jun 09 02:50:43 2012 +0000
+++ b/sys/kern/kern_uidinfo.c   Sat Jun 09 02:55:32 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_uidinfo.c,v 1.6 2012/06/09 02:31:15 christos Exp $        */
+/*     $NetBSD: kern_uidinfo.c,v 1.7 2012/06/09 02:55:32 christos Exp $        */
 
 /*-
  * Copyright (c) 1982, 1986, 1991, 1993
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_uidinfo.c,v 1.6 2012/06/09 02:31:15 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_uidinfo.c,v 1.7 2012/06/09 02:55:32 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -214,12 +214,7 @@
 
        uip = uid_find(uid);
        lwpcnt = atomic_add_long_nv(&uip->ui_lwpcnt, diff);
-#if 0
        KASSERT(lwpcnt >= 0);
-#else
-       if (lwpcnt < 0)
-               printf("pid=%d lwpcnt=%ld\n", uid, lwpcnt);
-#endif
        return lwpcnt;
 }
 



Home | Main Index | Thread Index | Old Index