[kernel][warnings] fix a few -Wmissing-declarations warnings in the kernel
This commit is contained in:
11
kernel/include/kernel/init.h
Normal file
11
kernel/include/kernel/init.h
Normal 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);
|
||||||
|
|
||||||
@@ -5,6 +5,8 @@
|
|||||||
* license that can be found in the LICENSE file or at
|
* license that can be found in the LICENSE file or at
|
||||||
* https://opensource.org/licenses/MIT
|
* https://opensource.org/licenses/MIT
|
||||||
*/
|
*/
|
||||||
|
#include <kernel/init.h>
|
||||||
|
|
||||||
#include <kernel/debug.h>
|
#include <kernel/debug.h>
|
||||||
#include <kernel/mp.h>
|
#include <kernel/mp.h>
|
||||||
#include <kernel/port.h>
|
#include <kernel/port.h>
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ static void novm_init(uint level) {
|
|||||||
LK_INIT_HOOK(novm, &novm_init, LK_INIT_LEVEL_PLATFORM_EARLY - 1);
|
LK_INIT_HOOK(novm, &novm_init, LK_INIT_LEVEL_PLATFORM_EARLY - 1);
|
||||||
#endif
|
#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)
|
if (pages == 0 || pages > n->pages)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ static void wakeup_cpu_for_thread(thread_t *t)
|
|||||||
mp_reschedule(1U << pinned_cpu, 0);
|
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));
|
memset(t, 0, sizeof(thread_t));
|
||||||
t->magic = THREAD_MAGIC;
|
t->magic = THREAD_MAGIC;
|
||||||
thread_set_pinned_cpu(t, -1);
|
thread_set_pinned_cpu(t, -1);
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
#include <app.h>
|
#include <app.h>
|
||||||
#include <arch.h>
|
#include <arch.h>
|
||||||
|
#include <kernel/init.h>
|
||||||
#include <kernel/mutex.h>
|
#include <kernel/mutex.h>
|
||||||
#include <kernel/novm.h>
|
#include <kernel/novm.h>
|
||||||
#include <kernel/thread.h>
|
#include <kernel/thread.h>
|
||||||
@@ -40,8 +41,6 @@ static uint secondary_bootstrap_thread_count;
|
|||||||
|
|
||||||
static int bootstrap2(void *arg);
|
static int bootstrap2(void *arg);
|
||||||
|
|
||||||
extern void kernel_init(void);
|
|
||||||
|
|
||||||
static void call_constructors(void) {
|
static void call_constructors(void) {
|
||||||
void **ctor;
|
void **ctor;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user