Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Kludge:



details:   https://anonhg.NetBSD.org/src/rev/30a1356b1f84
branches:  trunk
changeset: 486515:30a1356b1f84
user:      jhawk <jhawk%NetBSD.org@localhost>
date:      Wed May 24 02:22:36 2000 +0000

description:
Kludge:

Change #define's of the form
        #define panic(a) printf(a)
to
        #define \
        panic(a) printf(a)
to prevent ctags(1) from detecting there is a tag.
Otherwise, the tags file claims panic() is in subr_extent.c
instead of subr_prf.c.

diffstat:

 sys/kern/subr_extent.c |  34 ++++++++++++++++++++++++----------
 1 files changed, 24 insertions(+), 10 deletions(-)

diffs (48 lines):

diff -r 04ab5c89a559 -r 30a1356b1f84 sys/kern/subr_extent.c
--- a/sys/kern/subr_extent.c    Tue May 23 23:48:43 2000 +0000
+++ b/sys/kern/subr_extent.c    Wed May 24 02:22:36 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_extent.c,v 1.29 1999/10/11 22:57:17 thorpej Exp $ */
+/*     $NetBSD: subr_extent.c,v 1.30 2000/05/24 02:22:36 jhawk Exp $   */
 
 /*-
  * Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
@@ -66,15 +66,29 @@
 #include <stdio.h>
 #include <string.h>
 
-#define        malloc(s, t, flags)             malloc(s)
-#define        free(p, t)                      free(p)
-#define        tsleep(chan, pri, str, timo)    (EWOULDBLOCK)
-#define        wakeup(chan)                    ((void)0)
-#define        pool_get(pool, flags)           malloc(pool->pr_size,0,0)
-#define        pool_put(pool, rp)              free(rp,0)
-#define        panic(a)                        printf(a)
-#define        splhigh()                       (1)
-#define        splx(s)                         ((void)(s))
+/*
+ * Use multi-line #defines to avoid screwing up the kernel tags file;
+ * without this, ctags produces a tags file where panic() shows up
+ * in subr_extent.c rather than subr_prf.c.
+ */
+#define        \
+malloc(s, t, flags)            malloc(s)
+#define        \
+free(p, t)                     free(p)
+#define        \
+tsleep(chan, pri, str, timo)   (EWOULDBLOCK)
+#define        \
+wakeup(chan)                   ((void)0)
+#define        \
+pool_get(pool, flags)          malloc(pool->pr_size,0,0)
+#define        \
+pool_put(pool, rp)             free(rp,0)
+#define        \
+panic(a)                       printf(a)
+#define        \
+splhigh()                      (1)
+#define        \
+splx(s)                                ((void)(s))
 
 #define        KMEM_IS_RUNNING                 (1)
 #endif



Home | Main Index | Thread Index | Old Index