diff options
author | Alexis211 <alexis211@gmail.com> | 2009-10-24 18:24:46 +0200 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-10-24 18:24:46 +0200 |
commit | b639b99b3e8f4cf77560d8d473b13d992ac8eb10 (patch) | |
tree | 63ebeec75f4ab71d73d743afca04a98636dee165 /Source/Kernel/Core | |
parent | f62cfdc8ff6297616d68f6b195db7abc82ab457b (diff) | |
download | Melon-b639b99b3e8f4cf77560d8d473b13d992ac8eb10.tar.gz Melon-b639b99b3e8f4cf77560d8d473b13d992ac8eb10.zip |
More work on userland syscalls : Files are implemented.
TextFile now is a common (= kernel and userland) library.
Diffstat (limited to 'Source/Kernel/Core')
-rw-r--r-- | Source/Kernel/Core/Log.ns.h | 2 | ||||
-rw-r--r-- | Source/Kernel/Core/Sys.ns.cpp | 5 | ||||
-rw-r--r-- | Source/Kernel/Core/kmain.wtf.cpp | 1 |
3 files changed, 6 insertions, 2 deletions
diff --git a/Source/Kernel/Core/Log.ns.h b/Source/Kernel/Core/Log.ns.h index d825f62..dc126dc 100644 --- a/Source/Kernel/Core/Log.ns.h +++ b/Source/Kernel/Core/Log.ns.h @@ -1,7 +1,7 @@ #ifndef DEF_LOG_NS_H #define DEF_LOG_NS_H -#include <VFS/TextFile.class.h> +#include <TextFile.class.h> #define KL_PANIC 0 #define KL_CRITICAL 1 diff --git a/Source/Kernel/Core/Sys.ns.cpp b/Source/Kernel/Core/Sys.ns.cpp index 1b52c0f..e5dbdc0 100644 --- a/Source/Kernel/Core/Sys.ns.cpp +++ b/Source/Kernel/Core/Sys.ns.cpp @@ -5,6 +5,8 @@ #include <SyscallManager/IDT.ns.h> #include <Sys.iface.h> #include <UserManager/Usr.ns.h> +#include <MemoryManager/PhysMem.ns.h> +#include <DeviceManager/Time.ns.h> #define DEBUGVT(x) SimpleVT *x = new SimpleVT(4, 56, 0, 15); x->map(); x->put('\n'); @@ -146,6 +148,9 @@ void halt() { u32int scall(u8int wat, u32int a, u32int b, u32int c, u32int d) { if (wat == SYIF_HALT && ISROOT) halt(); if (wat == SYIF_REBOOT && ISROOT) reboot(); + if (wat == SYIF_UPTIME) return Time::uptime(); + if (wat == SYIF_TOTALRAM) return PhysMem::total() * 4; + if (wat == SYIF_FREERAM) return PhysMem::free() * 4; return (u32int) - 1; } diff --git a/Source/Kernel/Core/kmain.wtf.cpp b/Source/Kernel/Core/kmain.wtf.cpp index d2f8c7b..76d8971 100644 --- a/Source/Kernel/Core/kmain.wtf.cpp +++ b/Source/Kernel/Core/kmain.wtf.cpp @@ -26,7 +26,6 @@ #include <VFS/FileNode.class.h> #include <VFS/VFS.ns.h> #include <VFS/DirectoryNode.class.h> -#include <VFS/TextFile.class.h> #include <Core/Log.ns.h> #include <Shell/KernelShell.class.h> |