[kernel][warnings] fix a few -Wmissing-declarations warnings in the kernel

This commit is contained in:
Travis Geiselbrecht
2021-10-21 23:14:27 -07:00
parent a6ddffd80b
commit a895bcece5
5 changed files with 16 additions and 4 deletions

View File

@@ -0,0 +1,11 @@
/*
* Copyright (c) 2021 Travis Geiselbrecht
*
* 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
void kernel_init(void);

View File

@@ -5,6 +5,8 @@
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT
*/
#include <kernel/init.h>
#include <kernel/debug.h>
#include <kernel/mp.h>
#include <kernel/port.h>

View File

@@ -152,7 +152,7 @@ static void novm_init(uint level) {
LK_INIT_HOOK(novm, &novm_init, LK_INIT_LEVEL_PLATFORM_EARLY - 1);
#endif
void *novm_alloc_helper(struct novm_arena *n, size_t pages) {
static void *novm_alloc_helper(struct novm_arena *n, size_t pages) {
if (pages == 0 || pages > n->pages)
return NULL;

View File

@@ -108,7 +108,7 @@ static void wakeup_cpu_for_thread(thread_t *t)
mp_reschedule(1U << pinned_cpu, 0);
}
void init_thread_struct(thread_t *t, const char *name) {
static void init_thread_struct(thread_t *t, const char *name) {
memset(t, 0, sizeof(thread_t));
t->magic = THREAD_MAGIC;
thread_set_pinned_cpu(t, -1);

View File

@@ -14,6 +14,7 @@
#include <app.h>
#include <arch.h>
#include <kernel/init.h>
#include <kernel/mutex.h>
#include <kernel/novm.h>
#include <kernel/thread.h>
@@ -40,8 +41,6 @@ static uint secondary_bootstrap_thread_count;
static int bootstrap2(void *arg);
extern void kernel_init(void);
static void call_constructors(void) {
void **ctor;