Kernel/armv7 - Added IRQ stack, changed IRQs to be disabled until after handling
[tpg/acess2.git] / Kernel / syscalls.c
index 1294b21..e304b40 100644 (file)
@@ -7,6 +7,7 @@
 #include <acess.h>
 #include <syscalls.h>
 #include <proc.h>
+#include <hal_proc.h>
 #include <errno.h>
 #include <threads.h>
 
@@ -66,7 +67,7 @@ void SyscallHandler(tSyscallRegs *Regs)
        // -- Clone the current thread
        case SYS_CLONE:
                // Call clone system call
-               ret = Proc_Clone(&err, Regs->Arg1);
+               ret = Proc_Clone(Regs->Arg1);
                // Change user stack if a new stack address is passed
                if(ret == 0 && Regs->Arg2)
                        Regs->StackPointer = Regs->Arg2;
@@ -349,10 +350,10 @@ void SyscallHandler(tSyscallRegs *Regs)
        if( callNum != SYS_READ && callNum != SYS_WRITE ) {
        # endif
        LOG("err = %i", err);
-       if(Regs->Num != SYS_EXECVE)
-               LEAVE('x', ret);
-       else
+       if( callNum == SYS_EXECVE )
                LOG("Actual %i", ret);
+       else
+               LEAVE('x', ret);
        # if DEBUG < 2
        }
        # endif

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