summaryrefslogtreecommitdiff
path: root/Source/Kernel/Core
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Kernel/Core')
-rw-r--r--Source/Kernel/Core/CMem.ns.cpp35
-rw-r--r--Source/Kernel/Core/CMem.ns.h17
-rw-r--r--Source/Kernel/Core/Sys.ns.cpp2
-rw-r--r--Source/Kernel/Core/common.wtf.h28
-rw-r--r--Source/Kernel/Core/cppsupport.wtf.cpp2
-rw-r--r--Source/Kernel/Core/kmain.wtf.cpp6
-rw-r--r--Source/Kernel/Core/types.wtf.h19
7 files changed, 5 insertions, 104 deletions
diff --git a/Source/Kernel/Core/CMem.ns.cpp b/Source/Kernel/Core/CMem.ns.cpp
deleted file mode 100644
index c2129ec..0000000
--- a/Source/Kernel/Core/CMem.ns.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-#include <Core/common.wtf.h>
-
-namespace CMem {
-
-//Standard C functions
-u8int *memcpy(u8int *dest, const u8int *src, int count) {
- for (int i = 0; i < count; i++) {
- dest[i] = src[i];
- }
- return dest;
-}
-
-u8int *memset(u8int *dest, u8int val, int count) {
- for (int i = 0; i < count; i++) {
- dest[i] = val;
- }
- return dest;
-}
-
-u16int *memsetw(u16int *dest, u16int val, int count) {
- for (int i = 0; i < count; i++) {
- dest[i] = val;
- }
- return dest;
-}
-
-u32int strlen(const char *str) {
- u32int i = 0;
- while (str[i]) {
- i++;
- }
- return i;
-}
-
-}
diff --git a/Source/Kernel/Core/CMem.ns.h b/Source/Kernel/Core/CMem.ns.h
deleted file mode 100644
index f0c15da..0000000
--- a/Source/Kernel/Core/CMem.ns.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifdef DEF_COMMON
-
-#ifndef DEF_CMEM_NS_H
-#define DEF_CMEM_NS_H
-
-//This namespace contains basic memory managment functions
-
-namespace CMem {
- u8int *memcpy(u8int *dest, const u8int *src, int count);
- u8int *memset(u8int *dest, u8int val, int count);
- u16int *memsetw(u16int *dest, u16int val, int count);
- u32int strlen(const char *str);
-}
-
-#endif
-
-#endif
diff --git a/Source/Kernel/Core/Sys.ns.cpp b/Source/Kernel/Core/Sys.ns.cpp
index a8a6c91..c99544b 100644
--- a/Source/Kernel/Core/Sys.ns.cpp
+++ b/Source/Kernel/Core/Sys.ns.cpp
@@ -1,5 +1,5 @@
//This automatically includes Sys.ns.h
-#include <Core/common.wtf.h>
+#include <common.h>
#include <Core/Log.ns.h>
#include <VTManager/SimpleVT.class.h>
#include <SyscallManager/IDT.ns.h>
diff --git a/Source/Kernel/Core/common.wtf.h b/Source/Kernel/Core/common.wtf.h
deleted file mode 100644
index 5fb67b4..0000000
--- a/Source/Kernel/Core/common.wtf.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef DEF_COMMON
-#define DEF_COMMON
-
-#include <Config.h>
-
-//This file is very important : it contains type definitions, macro definitions and new/delete implementations.
-
-#define NULL 0
-
-#include <Core/types.wtf.h>
-
-#include <Core/CMem.ns.h>
-#include <Core/Sys.ns.h>
-
-#include <MemoryManager/Mem.ns.h>
-
-//Standard implemenations of operator new/delete
-inline void* operator new(u32int, void *p) { return p; }
-inline void* operator new[](u32int, void *p) { return p; }
-inline void operator delete(void*, void*) { }
-inline void operator delete[](void*, void*) { }
-
-inline void* operator new(u32int sz) { return Mem::kalloc(sz); }
-inline void* operator new[](u32int sz) { return Mem::kalloc(sz); }
-inline void operator delete(void *ptr) { Mem::kfree(ptr); }
-inline void operator delete[](void *ptr) { Mem::kfree(ptr); }
-
-#endif
diff --git a/Source/Kernel/Core/cppsupport.wtf.cpp b/Source/Kernel/Core/cppsupport.wtf.cpp
index bad28f2..2cefc39 100644
--- a/Source/Kernel/Core/cppsupport.wtf.cpp
+++ b/Source/Kernel/Core/cppsupport.wtf.cpp
@@ -1,5 +1,5 @@
//This file just contains a few methods required for some C++ things to work
-#include <Core/types.wtf.h>
+#include <types.h>
extern "C" void __cxa_pure_virtual() {} //Required when using abstract classes
diff --git a/Source/Kernel/Core/kmain.wtf.cpp b/Source/Kernel/Core/kmain.wtf.cpp
index 87e95de..a8fb002 100644
--- a/Source/Kernel/Core/kmain.wtf.cpp
+++ b/Source/Kernel/Core/kmain.wtf.cpp
@@ -1,6 +1,6 @@
//This file contains the kernel's main procedure
-#include <Core/common.wtf.h>
+#include <common.h>
#include <Core/multiboot.wtf.h>
#include <Devices/Display/VGATextOutput.class.h>
@@ -18,8 +18,8 @@
#include <MemoryManager/GDT.ns.h>
#include <TaskManager/Task.ns.h>
#include <SyscallManager/IDT.ns.h>
-#include <Library/String.class.h>
-#include <Library/ByteArray.class.h>
+#include <String.class.h>
+#include <ByteArray.class.h>
#include <VFS/Part.ns.h>
#include <FileSystems/RamFS/RamFS.class.h>
#include <VFS/FileNode.class.h>
diff --git a/Source/Kernel/Core/types.wtf.h b/Source/Kernel/Core/types.wtf.h
deleted file mode 100644
index ca6f73d..0000000
--- a/Source/Kernel/Core/types.wtf.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef DEF_TYPES_WTF_H
-#define DEF_TYPES_WTF_H
-
-//This file defines base types. It's made to be used also by C programs
-
-typedef unsigned int addr_t;
-typedef unsigned long long u64int;
-typedef unsigned int u32int;
-typedef unsigned short u16int;
-typedef unsigned char u8int;
-typedef long long s64int;
-typedef int s32int;
-typedef short s16int;
-typedef char s8int;
-
-#define U64 unsigned long long
-#define S64 long long
-
-#endif