From c3b5d65f8459a4889822fad0816f47f6450b9afa Mon Sep 17 00:00:00 2001 From: Matthias Kruk Date: Fri, 27 Sep 2019 15:08:52 +0900 Subject: [PATCH] Move architecture-independent process implementation out of the arch directory --- kernel/arch/Makefile | 2 +- kernel/core/Makefile | 2 +- kernel/{arch => core}/process.c | 0 kernel/include/process.h | 29 +++++++++++++++++++++++++++++ 4 files changed, 31 insertions(+), 2 deletions(-) rename kernel/{arch => core}/process.c (100%) create mode 100644 kernel/include/process.h diff --git a/kernel/arch/Makefile b/kernel/arch/Makefile index 8097994..e7e4cce 100644 --- a/kernel/arch/Makefile +++ b/kernel/arch/Makefile @@ -1,5 +1,5 @@ OBJECTS = boot.o debug.o init.o cpu.o cpu32.o entry.o interrupt.o paging.o apic.o i8259.o task.o \ - heap.o process.o + heap.o OUTPUT = arch.o LDFLAGS += -r INCLUDES = -I../../include -I../include -I../.. diff --git a/kernel/core/Makefile b/kernel/core/Makefile index 92db6f9..bb68e27 100644 --- a/kernel/core/Makefile +++ b/kernel/core/Makefile @@ -1,4 +1,4 @@ -OBJECTS = main.o +OBJECTS = main.o process.o OUTPUT = core.o INCLUDES = -I../include -I../../include -I../.. CFLAGS += $(INCLUDES) diff --git a/kernel/arch/process.c b/kernel/core/process.c similarity index 100% rename from kernel/arch/process.c rename to kernel/core/process.c diff --git a/kernel/include/process.h b/kernel/include/process.h new file mode 100644 index 0000000..c201180 --- /dev/null +++ b/kernel/include/process.h @@ -0,0 +1,29 @@ +/* + * This file is part of the Corax operating system. + * Copyright (C) 2016-2019 Matthias Kruk + * + * Corax 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 3 of the License, or + * (at your option) any later version. + * + * Corax 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 Corax. If not, see . + */ + +#ifndef __PROCESS_H +#define __PROCESS_H + +#include + +typedef struct process process_t; + +int process_create(process_t**, u32_t, void*); +int process_switch(process_t*); + +#endif /* __PROCESS_H */ -- 2.47.3