Source-Changes-HG archive

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

[src/trunk]: src/sys/ddb Revert introduction of db_alloc.h.



details:   https://anonhg.NetBSD.org/src/rev/a7d381f0b33f
branches:  trunk
changeset: 972608:a7d381f0b33f
user:      rin <rin%NetBSD.org@localhost>
date:      Sun May 31 09:51:55 2020 +0000

description:
Revert introduction of db_alloc.h.

db_alloc() and friends are already provided in crash.c.
Sorry for confusing you...

diffstat:

 sys/ddb/db_alloc.h   |  42 ------------------------------------------
 sys/ddb/db_command.h |   6 +++++-
 sys/ddb/ddb.h        |   3 +--
 3 files changed, 6 insertions(+), 45 deletions(-)

diffs (82 lines):

diff -r 30edec7c9866 -r a7d381f0b33f sys/ddb/db_alloc.h
--- a/sys/ddb/db_alloc.h        Sun May 31 09:42:46 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*     $NetBSD: db_alloc.h,v 1.1 2020/05/31 09:40:09 rin Exp $ */
-
-/*-
- * Copyright (c) 2020 The NetBSD Foundation, Inc.
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``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 FOUNDATION OR CONTRIBUTORS
- * 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.
- */
-
-#ifndef _DDB_ALLOC_
-#define _DDB_ALLOC_
-
-#ifdef _KERNEL
-void   *db_alloc(size_t);
-void   *db_zalloc(size_t);
-void   db_free(void *, size_t);
-#else
-#define db_alloc(sz)   malloc(size)
-#define db_zalloc(sz)  calloc(1, (size))
-#define db_free(p, sz) free(p)
-#endif
-
-#endif /* _DDB_ALLOC_ */
diff -r 30edec7c9866 -r a7d381f0b33f sys/ddb/db_command.h
--- a/sys/ddb/db_command.h      Sun May 31 09:42:46 2020 +0000
+++ b/sys/ddb/db_command.h      Sun May 31 09:51:55 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_command.h,v 1.37 2020/05/31 09:40:09 rin Exp $      */
+/*     $NetBSD: db_command.h,v 1.38 2020/05/31 09:51:55 rin Exp $      */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 1999, 2002 The NetBSD Foundation, Inc.
@@ -144,6 +144,10 @@
 #endif
 };
 
+void   *db_alloc(size_t);
+void   *db_zalloc(size_t);
+void   db_free(void *, size_t);
+
 #ifndef _KERNEL
 #define db_kernelonly() \
     db_printf("%s: can only be used in-kernel.\n", __func__)
diff -r 30edec7c9866 -r a7d381f0b33f sys/ddb/ddb.h
--- a/sys/ddb/ddb.h     Sun May 31 09:42:46 2020 +0000
+++ b/sys/ddb/ddb.h     Sun May 31 09:51:55 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ddb.h,v 1.4 2020/05/31 09:40:09 rin Exp $      */
+/*     $NetBSD: ddb.h,v 1.5 2020/05/31 09:51:55 rin Exp $      */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -50,6 +50,5 @@
 #include <ddb/db_proc.h>
 #include <ddb/db_cpu.h>
 #include <ddb/db_autoconf.h>
-#include <ddb/db_alloc.h>
 
 #endif /* _DDB_DDB_H_ */



Home | Main Index | Thread Index | Old Index