[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 28/68] i386/i386at: remove forward declarations
From: |
Marin Ramesa |
Subject: |
[PATCH 28/68] i386/i386at: remove forward declarations |
Date: |
Fri, 29 Nov 2013 22:53:53 +0100 |
* Makefrag.am: Include kern/startup.h.
* i386/i386at/model_dep.c: Include kern/startup.h.
Include i386at/model_dep.h.
(setup_main, halt_all_cpus, halt_cpu, inittodr): Remove forward declarations.
* i386/i386at/model_dep.h (halt_all_cpus, halt_cpu, inittodr): Add prototypes.
* kern/startup.h: New file.
Add copyright.
[_KERN_STARTUP_H_]: Add ifndef.
(setup_main): Add prototype.
---
Makefrag.am | 1 +
i386/i386at/model_dep.c | 10 ++--------
i386/i386at/model_dep.h | 5 +++++
kern/startup.h | 24 ++++++++++++++++++++++++
4 files changed, 32 insertions(+), 8 deletions(-)
create mode 100644 kern/startup.h
diff --git a/Makefrag.am b/Makefrag.am
index 2e08df1..2d09b62 100644
--- a/Makefrag.am
+++ b/Makefrag.am
@@ -190,6 +190,7 @@ libkernel_a_SOURCES += \
kern/sched_prim.h \
kern/shuttle.h \
kern/startup.c \
+ kern/startup.h \
kern/strings.c \
kern/syscall_emulation.c \
kern/syscall_emulation.h \
diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c
index 5024036..f0f9ed6 100644
--- a/i386/i386at/model_dep.c
+++ b/i386/i386at/model_dep.c
@@ -48,6 +48,7 @@
#include <kern/debug.h>
#include <kern/mach_clock.h>
#include <kern/printf.h>
+#include <kern/startup.h>
#include <sys/time.h>
#include <sys/types.h>
#include <vm/vm_page.h>
@@ -67,6 +68,7 @@
#include <i386at/int_init.h>
#include <i386at/kd.h>
#include <i386at/rtc.h>
+#include <i386at/model_dep.h>
#ifdef MACH_XEN
#include <xen/console.h>
#include <xen/store.h>
@@ -125,13 +127,6 @@ static vm_size_t avail_remaining;
extern char version[];
-extern void setup_main();
-
-void halt_all_cpus (boolean_t reboot) __attribute__ ((noreturn));
-void halt_cpu (void) __attribute__ ((noreturn));
-
-void inittodr(); /* forward */
-
int rebootflag = 0; /* exported to kdintr */
/* XX interrupt stack pointer and highwater mark, for locore.S. */
@@ -620,7 +615,6 @@ void c_boot_entry(vm_offset_t bi)
#include <mach/vm_prot.h>
#include <vm/pmap.h>
#include <mach/time_value.h>
-#include <i386at/model_dep.h>
int
timemmap(prot)
diff --git a/i386/i386at/model_dep.h b/i386/i386at/model_dep.h
index 47fd53d..b4f8a17 100644
--- a/i386/i386at/model_dep.h
+++ b/i386/i386at/model_dep.h
@@ -23,4 +23,9 @@
extern int timemmap(vm_prot_t prot);
+void halt_all_cpus(boolean_t reboot) __attribute__ ((noreturn));
+void halt_cpu(void) __attribute__ ((noreturn));
+
+void inittodr(void);
+
#endif /* _MODEL_DEP_H_ */
diff --git a/kern/startup.h b/kern/startup.h
new file mode 100644
index 0000000..07deb80
--- /dev/null
+++ b/kern/startup.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2013 Free Software Foundation.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef _KERN_STARTUP_H_
+#define _KERN_STARTUP_H_
+
+extern void setup_main(void);
+
+#endif /* _KERN_STARTUP_H_ */
--
1.8.1.4
- Re: [PATCH 19/68] i386/i386/ldt.c: remove useless forward declaration without definition, (continued)
[PATCH 21/68] kern: new header file exception.h, Marin Ramesa, 2013/11/29
[PATCH 20/68] i386/i386/pcb.c: remove forward declarations, Marin Ramesa, 2013/11/29
[PATCH 22/68] kern/exception.c: remove forward declarations, Marin Ramesa, 2013/11/29
[PATCH 23/68] i386/i386at/autoconf.c, com.c, lpr.c: remove forward declarations, Marin Ramesa, 2013/11/29
[PATCH 25/68] i386/i386at/kd.c: remove forward declarations, Marin Ramesa, 2013/11/29
[PATCH 24/68] i386/i386at/conf.c: remove forward declarations, Marin Ramesa, 2013/11/29
[PATCH 26/68] i386/i386at/kd_event.c: remove forward declarations, Marin Ramesa, 2013/11/29
[PATCH 27/68] i386/i386at/kd_mouse.c: remove forward declarations, Marin Ramesa, 2013/11/29
[PATCH 28/68] i386/i386at: remove forward declarations,
Marin Ramesa <=
[PATCH 29/68] i386/i386at/pic_isa.c: remove forward declaration, Marin Ramesa, 2013/11/29
[PATCH 30/68] i386/intel/pmap.c: remove forward declarations, Marin Ramesa, 2013/11/29
[PATCH 32/68] ipc/ipc_table.c: remove forward declaration, Marin Ramesa, 2013/11/29
[PATCH 31/68] ipc/ipc_kmsg.c: remove forward declarations, Marin Ramesa, 2013/11/29
[PATCH 33/68] ipc/mach_msg.c: remove forward declarations, Marin Ramesa, 2013/11/29
[PATCH 34/68] kern/bootstrap.c: remove forward declarations, Marin Ramesa, 2013/11/29
[PATCH 35/68] kern/debug.c: remove forward declaration, Marin Ramesa, 2013/11/29
[PATCH 36/68] kern/ipc_mig.c: remove forward declarations, Marin Ramesa, 2013/11/29
[PATCH 37/68] kern/processor.c: remove forward declarations, Marin Ramesa, 2013/11/29