Kernel/x86_64 - Update for Proc_SpawnWorker API change
authorJohn Hodge <[email protected]>
Sun, 16 Sep 2012 04:09:34 +0000 (12:09 +0800)
committerJohn Hodge <[email protected]>
Sun, 16 Sep 2012 04:09:34 +0000 (12:09 +0800)
KernelLand/Kernel/arch/x86_64/proc.c

index 18cfd02..48504a8 100644 (file)
@@ -534,7 +534,7 @@ tTID Proc_Clone(Uint Flags)
  * \fn int Proc_SpawnWorker(void)
  * \brief Spawns a new worker thread
  */
-int Proc_SpawnWorker(void (*Fcn)(void*), void *Data)
+tThread *Proc_SpawnWorker(void (*Fcn)(void*), void *Data)
 {
        tThread *new, *cur;
        Uint    stack_contents[3];
@@ -545,7 +545,7 @@ int Proc_SpawnWorker(void (*Fcn)(void*), void *Data)
        new = Threads_CloneThreadZero();
        if(!new) {
                Warning("Proc_SpawnWorker - Out of heap space!\n");
-               return -1;
+               return NULL;
        }
 
        // Create the stack contents
@@ -567,7 +567,7 @@ int Proc_SpawnWorker(void (*Fcn)(void*), void *Data)
        new->Status = THREAD_STAT_PREINIT;
        Threads_AddActive( new );
        
-       return new->TID;
+       return new;
 }
 
 /**

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