Kernel - Fixing up doxygen commenting
[tpg/acess2.git] / Kernel / arch / armv7 / proc.c
index d61160f..08257d9 100644 (file)
@@ -21,7 +21,6 @@ extern char   kernel_table0[];
 
 // === PROTOTYPES ===
 void   Proc_IdleThread(void *unused);
-tTID   Proc_NewKThread(void (*Fnc)(void*), void *Ptr);
 
 // === GLOBALS ===
 tThread        *gpCurrentThread = &gThreadZero;
@@ -127,7 +126,7 @@ tTID Proc_SpawnWorker( void (*Fnc)(void*), void *Ptr )
 
        new = Threads_CloneThreadZero();
        if(!new)        return -1;
-       free(new->ThreadName);
+       if(new->ThreadName)     free(new->ThreadName);
        new->ThreadName = NULL;
 
        new->KernelStack = MM_NewKStack(1);
@@ -140,7 +139,6 @@ tTID Proc_SpawnWorker( void (*Fnc)(void*), void *Ptr )
        sp = new->KernelStack;
        
        *(Uint32*)(sp -= 4) = (Uint)Ptr;
-       *(Uint32*)(sp -= 4) = 1;
        *(Uint32*)(sp -= 4) = (Uint)Fnc;
        *(Uint32*)(sp -= 4) = (Uint)new;
 
@@ -173,7 +171,6 @@ tTID Proc_NewKThread( void (*Fnc)(void*), void *Ptr )
        sp = new->KernelStack;
        
        *(Uint32*)(sp -= 4) = (Uint)Ptr;
-       *(Uint32*)(sp -= 4) = 1;
        *(Uint32*)(sp -= 4) = (Uint)Fnc;
        *(Uint32*)(sp -= 4) = (Uint)new;
 

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