Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Constify a little.
details: https://anonhg.NetBSD.org/src/rev/28bcd17b572c
branches: trunk
changeset: 340198:28bcd17b572c
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Thu Aug 27 02:43:20 2015 +0000
description:
Constify a little.
diffstat:
sys/kern/kern_ksyms.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diffs (50 lines):
diff -r 62dc42d21794 -r 28bcd17b572c sys/kern/kern_ksyms.c
--- a/sys/kern/kern_ksyms.c Wed Aug 26 09:24:01 2015 +0000
+++ b/sys/kern/kern_ksyms.c Thu Aug 27 02:43:20 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_ksyms.c,v 1.79 2015/08/21 06:55:25 christos Exp $ */
+/* $NetBSD: kern_ksyms.c,v 1.80 2015/08/27 02:43:20 uebayasi Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -68,10 +68,12 @@
* TODO:
*
* Add support for mmap, poll.
+ * Constify tables.
+ * Constify db_symtab and move it to .rodata.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.79 2015/08/21 06:55:25 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.80 2015/08/27 02:43:20 uebayasi Exp $");
#if defined(_KERNEL) && defined(_KERNEL_OPT)
#include "opt_ddb.h"
@@ -113,7 +115,7 @@
static kmutex_t ksyms_lock __cacheline_aligned;
static struct ksyms_symtab kernel_symtab;
-static void ksyms_hdr_init(void *);
+static void ksyms_hdr_init(const void *);
static void ksyms_sizes_calc(void);
#ifdef KSYMS_DEBUG
@@ -141,7 +143,7 @@
TAILQ_HEAD_INITIALIZER(ksyms_symtabs);
static int
-ksyms_verify(void *symstart, void *strstart)
+ksyms_verify(const void *symstart, const void *strstart)
{
#if defined(DIAGNOSTIC) || defined(DEBUG)
if (symstart == NULL)
@@ -864,7 +866,7 @@
}
static void
-ksyms_hdr_init(void *hdraddr)
+ksyms_hdr_init(const void *hdraddr)
{
/* Copy the loaded elf exec header */
memcpy(&ksyms_hdr.kh_ehdr, hdraddr, sizeof(Elf_Ehdr));
Home |
Main Index |
Thread Index |
Old Index