Kernel/Heap - (minor) Commenting spellfixes
[tpg/acess2.git] / KernelLand / Kernel / syscalls.c
index 7a96011..96f1f85 100644 (file)
@@ -72,6 +72,10 @@ void SyscallHandler(tSyscallRegs *Regs)
        
        // -- Put the current thread to sleep
        case SYS_SLEEP: Threads_Sleep();        break;
+
+       case SYS_TIMEDSLEEP:
+               Time_Delay(Regs->Arg1);
+               break;
        
        // -- Yield current timeslice
        case SYS_YIELD: Threads_Yield();        break;
@@ -199,7 +203,20 @@ void SyscallHandler(tSyscallRegs *Regs)
                // Path, *Entrypoint
                ret = Binary_Load((char*)Regs->Arg1, (Uint*)Regs->Arg2);
                break;
-       
+
+       // -- Load a kernel module
+       case SYS_LOADMOD:
+               CHECK_STR_NONULL( (const char *)Regs->Arg1 );
+               if( Threads_GetUID() != 0 ) {
+                       MERR("Not root");
+                       ret = EACCES;
+               }
+               else {
+                       LOG("Module_LoadFile(\"%s\", NULL)", (const char *)Regs->Arg1);
+                       ret = Module_LoadFile( (const char *)Regs->Arg1, NULL );
+               }
+               break;
+
        // ---
        // Virtual Filesystem
        // ---

UCC git Repository :: git.ucc.asn.au