kernel: Fix build without DDB.
authorSascha Wildner <saw@online.de>
Tue, 2 Apr 2013 18:04:08 +0000 (20:04 +0200)
committerSascha Wildner <saw@online.de>
Tue, 2 Apr 2013 18:04:08 +0000 (20:04 +0200)
sys/kern/lwkt_token.c

index aa02334..4d52aff 100644 (file)
@@ -53,7 +53,6 @@
 #include <sys/queue.h>
 #include <sys/sysctl.h>
 #include <sys/ktr.h>
-#include <ddb/ddb.h>
 #include <sys/kthread.h>
 #include <machine/cpu.h>
 #include <sys/lock.h>
 #include <machine/stdarg.h>
 #include <machine/smp.h>
 
+#include "opt_ddb.h"
+#ifdef DDB
+#include <ddb/ddb.h>
+#endif
+
 extern int lwkt_sched_debug;
 
 #ifndef LWKT_NUM_POOL_TOKENS
@@ -933,6 +937,7 @@ lwkt_token_swap(void)
        crit_exit();
 }
 
+#ifdef DDB
 DB_SHOW_COMMAND(tokens, db_tok_all)
 {
        struct lwkt_token *tok, **ptr;
@@ -957,3 +962,4 @@ DB_SHOW_COMMAND(tokens, db_tok_all)
                    tok->t_collisions, tok->t_desc);
        }
 }
+#endif /* DDB */