[kernel][init] Move a function declaration to a shared header

Change-Id: Ifdf3cdeedb4ef3e590314aa896edaf19d3112341
diff --git a/kernel/include/kernel/init.h b/kernel/include/kernel/init.h
new file mode 100644
index 0000000..b22f5fb
--- /dev/null
+++ b/kernel/include/kernel/init.h
@@ -0,0 +1,15 @@
+// Copyright 2017 The Fuchsia Authors
+//
+// Use of this source code is governed by a MIT-style
+// license that can be found in the LICENSE file or at
+// https://opensource.org/licenses/MIT
+
+#pragma once
+
+#include <zircon/compiler.h>
+
+__BEGIN_CDECLS
+
+void kernel_init(void);
+
+__END_CDECLS
diff --git a/kernel/kernel/init.c b/kernel/kernel/init.c
index 9580271..bbdb134 100644
--- a/kernel/kernel/init.c
+++ b/kernel/kernel/init.c
@@ -5,14 +5,14 @@
 // license that can be found in the LICENSE file or at
 // https://opensource.org/licenses/MIT
 
+#include <kernel/init.h>
+
 #include <debug.h>
 #include <kernel/mp.h>
 #include <kernel/thread.h>
 #include <kernel/timer.h>
 #include <zircon/compiler.h>
 
-void kernel_init(void);
-
 void kernel_init(void) {
     // initialize the threading system
     dprintf(SPEW, "initializing mp\n");
diff --git a/kernel/top/main.cpp b/kernel/top/main.cpp
index 1d13ba8..71c7314 100644
--- a/kernel/top/main.cpp
+++ b/kernel/top/main.cpp
@@ -14,6 +14,7 @@
 #include <app.h>
 #include <arch.h>
 #include <debug.h>
+#include <kernel/init.h>
 #include <kernel/mutex.h>
 #include <kernel/thread.h>
 #include <lib/heap.h>
@@ -32,8 +33,6 @@
 
 static int bootstrap2(void* arg);
 
-extern "C" void kernel_init();
-
 static void call_constructors() {
     for (void (*const* a)() = __init_array_start; a != __init_array_end; a++)
         (*a)();