summaryrefslogtreecommitdiff
path: root/sys/kern/subr_unit.c
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2005-03-14 06:51:29 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2005-03-14 06:51:29 +0000
commit93f6c81e2598cbce6f99523ddae6041aaf91f287 (patch)
treea1308342142e7c99bd3090bc2b17a9533a74dc57 /sys/kern/subr_unit.c
parent257eeb8e0b57156af0d02ecc07039e2e55dba45e (diff)
Notes
Diffstat (limited to 'sys/kern/subr_unit.c')
-rw-r--r--sys/kern/subr_unit.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/kern/subr_unit.c b/sys/kern/subr_unit.c
index 0bf0ec96b849..910020d9c481 100644
--- a/sys/kern/subr_unit.c
+++ b/sys/kern/subr_unit.c
@@ -199,7 +199,6 @@ struct unrhdr {
struct mtx *mtx;
};
-static void print_unrhdr(struct unrhdr *uh);
#if defined(DIAGNOSTIC) || !defined(_KERNEL)
/*
@@ -311,7 +310,6 @@ new_unrhdr(int low, int high, struct mtx *mutex)
uh->first = 0;
uh->last = 1 + (high - low);
check_unrhdr(uh, __LINE__);
-printf("NEW_UNRHDR %x-%x -> %p\n", low, high, uh);
return (uh);
}
@@ -564,11 +562,8 @@ alloc_unrl(struct unrhdr *uh)
* We can always allocate from the first list element, so if we have
* nothing on the list, we must have run out of unit numbers.
*/
- if (up == NULL) {
-printf("Out of units %p\n", uh);
-print_unrhdr(uh);
+ if (up == NULL)
return (-1);
- }
KASSERT(up->ptr != uh, ("UNR first element is allocated"));
@@ -730,6 +725,8 @@ free_unr(struct unrhdr *uh, u_int item)
Free(p2);
}
+#ifndef _KERNEL /* USERLAND test driver */
+
/*
* Simple stochastic test driver for the above functions
*/
@@ -778,8 +775,6 @@ print_unrhdr(struct unrhdr *uh)
}
}
-#ifndef _KERNEL /* USERLAND test driver */
-
/* Number of unrs to test */
#define NN 10000