Revert introduction of db_alloc.h.
db_alloc() and friends are already provided in crash.c. Sorry for confusing you...
This commit is contained in:
parent
223a0956ca
commit
c3cc3a31be
@ -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_ */
|
@ -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 @@ struct db_command {
|
||||
#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__)
|
||||
|
@ -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_ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user