Module Name:    src
Committed By:   pooka
Date:           Tue Jan 19 22:28:31 UTC 2010

Modified Files:
        src/sys/compat/common: kern_time_50.c
        src/sys/dev/ata: wd.c
        src/sys/kern: sys_sig.c
        src/sys/lib/libkern: Makefile.libkern libkern.h
        src/sys/sys: signalvar.h
Added Files:
        src/sys/lib/libkern: kern_assert.c
Removed Files:
        src/sys/lib/libkern: __assert.c

Log Message:
Get rid of last "easy" kernel symbols starting with __:
__assert -> kern_assert
__sigtimedwait1 -> sigtimedwait1
__wdstart -> wdstart1

The rest are MD and/or shared with userspace, so they will require
a little more involvement than what is available for this quick
"ride the 5.99.24 bump" action.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/compat/common/kern_time_50.c
cvs rdiff -u -r1.381 -r1.382 src/sys/dev/ata/wd.c
cvs rdiff -u -r1.25 -r1.26 src/sys/kern/sys_sig.c
cvs rdiff -u -r1.8 -r1.9 src/sys/lib/libkern/Makefile.libkern
cvs rdiff -u -r1.11 -r0 src/sys/lib/libkern/__assert.c
cvs rdiff -u -r0 -r1.1 src/sys/lib/libkern/kern_assert.c
cvs rdiff -u -r1.92 -r1.93 src/sys/lib/libkern/libkern.h
cvs rdiff -u -r1.75 -r1.76 src/sys/sys/signalvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/common/kern_time_50.c
diff -u src/sys/compat/common/kern_time_50.c:1.12 src/sys/compat/common/kern_time_50.c:1.13
--- src/sys/compat/common/kern_time_50.c:1.12	Wed Nov 11 09:48:50 2009
+++ src/sys/compat/common/kern_time_50.c	Tue Jan 19 22:28:31 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_time_50.c,v 1.12 2009/11/11 09:48:50 rmind Exp $	*/
+/*	$NetBSD: kern_time_50.c,v 1.13 2010/01/19 22:28:31 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_time_50.c,v 1.12 2009/11/11 09:48:50 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time_50.c,v 1.13 2010/01/19 22:28:31 pooka Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_aio.h"
@@ -629,7 +629,7 @@
     const struct compat_50_sys___sigtimedwait_args *uap, register_t *retval)
 {
 
-	return __sigtimedwait1(l,
+	return sigtimedwait1(l,
 	    (const struct sys_____sigtimedwait50_args *)uap, retval, copyout,
 	    tscopyin, tscopyout);
 }

Index: src/sys/dev/ata/wd.c
diff -u src/sys/dev/ata/wd.c:1.381 src/sys/dev/ata/wd.c:1.382
--- src/sys/dev/ata/wd.c:1.381	Fri Jan  8 19:48:12 2010
+++ src/sys/dev/ata/wd.c	Tue Jan 19 22:28:31 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: wd.c,v 1.381 2010/01/08 19:48:12 dyoung Exp $ */
+/*	$NetBSD: wd.c,v 1.382 2010/01/19 22:28:31 pooka Exp $ */
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -54,7 +54,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.381 2010/01/08 19:48:12 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.382 2010/01/19 22:28:31 pooka Exp $");
 
 #include "opt_ata.h"
 
@@ -175,7 +175,7 @@
 void  wdgetdefaultlabel(struct wd_softc *, struct disklabel *);
 void  wdgetdisklabel(struct wd_softc *);
 void  wdstart(void *);
-void  __wdstart(struct wd_softc*, struct buf *);
+void  wdstart1(struct wd_softc*, struct buf *);
 void  wdrestart(void *);
 void  wddone(void *);
 int   wd_get_params(struct wd_softc *, u_int8_t, struct ataparams *);
@@ -585,7 +585,7 @@
 		wd->openings--;
 
 		wd->retries = 0;
-		__wdstart(wd, bp);
+		wdstart1(wd, bp);
 	}
 }
 
@@ -623,7 +623,7 @@
 	bp->b_data = (char *)bp->b_data + bp->b_bcount;
 	bp->b_blkno += (bp->b_bcount / 512);
 	bp->b_rawblkno += (bp->b_bcount / 512);
-	__wdstart(sc, bp);
+	wdstart1(sc, bp);
 	return;
 
  done:
@@ -636,7 +636,7 @@
 }
 
 void
-__wdstart(struct wd_softc *wd, struct buf *bp)
+wdstart1(struct wd_softc *wd, struct buf *bp)
 {
 
 	/*
@@ -721,7 +721,7 @@
 	case ATACMD_COMPLETE:
 		break;
 	default:
-		panic("__wdstart: bad return code from ata_bio()");
+		panic("wdstart1: bad return code from ata_bio()");
 	}
 }
 
@@ -831,7 +831,7 @@
 	ATADEBUG_PRINT(("wdrestart %s\n", device_xname(wd->sc_dev)),
 	    DEBUG_XFERS);
 	s = splbio();
-	__wdstart(v, bp);
+	wdstart1(v, bp);
 	splx(s);
 }
 

Index: src/sys/kern/sys_sig.c
diff -u src/sys/kern/sys_sig.c:1.25 src/sys/kern/sys_sig.c:1.26
--- src/sys/kern/sys_sig.c:1.25	Sun Dec 20 04:49:09 2009
+++ src/sys/kern/sys_sig.c	Tue Jan 19 22:28:31 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_sig.c,v 1.25 2009/12/20 04:49:09 rmind Exp $	*/
+/*	$NetBSD: sys_sig.c,v 1.26 2010/01/19 22:28:31 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_sig.c,v 1.25 2009/12/20 04:49:09 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_sig.c,v 1.26 2010/01/19 22:28:31 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -315,7 +315,7 @@
     const struct sys_____sigtimedwait50_args *uap, register_t *retval)
 {
 
-	return __sigtimedwait1(l, uap, retval, copyout, copyin, copyout);
+	return sigtimedwait1(l, uap, retval, copyout, copyin, copyout);
 }
 
 int
@@ -620,7 +620,7 @@
 }
 
 int
-__sigtimedwait1(struct lwp *l, const struct sys_____sigtimedwait50_args *uap,
+sigtimedwait1(struct lwp *l, const struct sys_____sigtimedwait50_args *uap,
     register_t *retval, copyout_t storeinf, copyin_t fetchts, copyout_t storets)
 {
 	/* {

Index: src/sys/lib/libkern/Makefile.libkern
diff -u src/sys/lib/libkern/Makefile.libkern:1.8 src/sys/lib/libkern/Makefile.libkern:1.9
--- src/sys/lib/libkern/Makefile.libkern:1.8	Mon Dec 14 12:18:14 2009
+++ src/sys/lib/libkern/Makefile.libkern	Tue Jan 19 22:28:30 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.libkern,v 1.8 2009/12/14 12:18:14 uebayasi Exp $
+#	$NetBSD: Makefile.libkern,v 1.9 2010/01/19 22:28:30 pooka Exp $
 
 # 
 # Variable definitions for libkern.  
@@ -55,7 +55,7 @@
 .endif
 
 # Other stuff
-SRCS+=	__assert.c __main.c
+SRCS+=	kern_assert.c __main.c
 SRCS+=	__cmsg_alignbytes.c cpuset.c inet_addr.c intoa.c
 .if empty(SRCS:Mbyte_swap_8.*)
 SRCS+=	bswap64.c

Index: src/sys/lib/libkern/libkern.h
diff -u src/sys/lib/libkern/libkern.h:1.92 src/sys/lib/libkern/libkern.h:1.93
--- src/sys/lib/libkern/libkern.h:1.92	Tue Jul 21 14:55:33 2009
+++ src/sys/lib/libkern/libkern.h	Tue Jan 19 22:28:30 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: libkern.h,v 1.92 2009/07/21 14:55:33 joerg Exp $	*/
+/*	$NetBSD: libkern.h,v 1.93 2010/01/19 22:28:30 pooka Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -179,10 +179,10 @@
 #else
 #ifdef __STDC__
 #define	assert(e)	(__predict_true((e)) ? (void)0 :		    \
-			    __kernassert("", __FILE__, __LINE__, #e))
+			    kern_assert("", __FILE__, __LINE__, #e))
 #else
 #define	assert(e)	(__predict_true((e)) ? (void)0 :		    \
-			    __kernassert("", __FILE__, __LINE__, "e"))
+			    kern_assert("", __FILE__, __LINE__, "e"))
 #endif
 #endif
 
@@ -213,10 +213,10 @@
 	} while (/*CONSTCOND*/ 0)
 #ifdef __STDC__
 #define	KASSERT(e)	(__predict_true((e)) ? (void)0 :		    \
-			    __kernassert("diagnostic ", __FILE__, __LINE__, #e))
+			    kern_assert("diagnostic ", __FILE__, __LINE__, #e))
 #else
 #define	KASSERT(e)	(__predict_true((e)) ? (void)0 :		    \
-			    __kernassert("diagnostic ", __FILE__, __LINE__,"e"))
+			    kern_assert("diagnostic ", __FILE__, __LINE__,"e"))
 #endif
 #endif
 
@@ -229,10 +229,10 @@
 #else
 #ifdef __STDC__
 #define	KDASSERT(e)	(__predict_true((e)) ? (void)0 :		    \
-			    __kernassert("debugging ", __FILE__, __LINE__, #e))
+			    kern_assert("debugging ", __FILE__, __LINE__, #e))
 #else
 #define	KDASSERT(e)	(__predict_true((e)) ? (void)0 :		    \
-			    __kernassert("debugging ", __FILE__, __LINE__, "e"))
+			    kern_assert("debugging ", __FILE__, __LINE__, "e"))
 #endif
 #endif
 /*
@@ -298,7 +298,7 @@
 #define	ffs(x)		__builtin_ffs(x)
 #endif
 
-void	 __kernassert(const char *, const char *, int, const char *);
+void	 kern_assert(const char *, const char *, int, const char *);
 unsigned int
 	bcdtobin(unsigned int);
 unsigned int

Index: src/sys/sys/signalvar.h
diff -u src/sys/sys/signalvar.h:1.75 src/sys/sys/signalvar.h:1.76
--- src/sys/sys/signalvar.h:1.75	Sun Jan 11 02:45:55 2009
+++ src/sys/sys/signalvar.h	Tue Jan 19 22:28:31 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: signalvar.h,v 1.75 2009/01/11 02:45:55 christos Exp $	*/
+/*	$NetBSD: signalvar.h,v 1.76 2010/01/19 22:28:31 pooka Exp $	*/
 
 /*
  * Copyright (c) 1991, 1993
@@ -179,8 +179,8 @@
 void	ksiginfo_queue_drain0(ksiginfoq_t *);
 
 struct sys_____sigtimedwait50_args;
-int	__sigtimedwait1(struct lwp *, const struct sys_____sigtimedwait50_args *,
-    register_t *, copyout_t, copyin_t, copyout_t);
+int	sigtimedwait1(struct lwp *, const struct sys_____sigtimedwait50_args *,
+		      register_t *, copyout_t, copyin_t, copyout_t);
 
 void	signotify(struct lwp *);
 int	sigispending(struct lwp *, int);

Added files:

Index: src/sys/lib/libkern/kern_assert.c
diff -u /dev/null src/sys/lib/libkern/kern_assert.c:1.1
--- /dev/null	Tue Jan 19 22:28:31 2010
+++ src/sys/lib/libkern/kern_assert.c	Tue Jan 19 22:28:30 2010
@@ -0,0 +1,52 @@
+/*	$NetBSD: kern_assert.c,v 1.1 2010/01/19 22:28:30 pooka Exp $	*/
+
+/*
+ * Copyright (c) 1996 Christopher G. Demetriou
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *      This product includes software developed by Christopher G. Demetriou
+ *	for the NetBSD Project.
+ * 4. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/types.h>
+#include <sys/systm.h>
+
+#ifdef _STANDALONE
+#include <lib/libkern/libkern.h>
+#endif
+
+void
+kern_assert(const char *t, const char *f, int l, const char *e)
+{
+
+#ifdef _KERNEL
+	if (panicstr != NULL)
+		return;
+#endif
+
+	panic("kernel %sassertion \"%s\" failed: file \"%s\", line %d",
+	    t, e, f, l);
+}

Reply via email to