X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Fthreads.c;h=76041f58b4f713533786339488d690f134e2378b;hb=dc42c3998b01e66a609fed5d503a81a972e636d6;hp=10226a136e9f74b1253104abe063efda363835b1;hpb=c648a754a16a38124b7eee0e7aaab685349aaf60;p=tpg%2Facess2.git diff --git a/Kernel/threads.c b/Kernel/threads.c index 10226a13..76041f58 100644 --- a/Kernel/threads.c +++ b/Kernel/threads.c @@ -233,12 +233,10 @@ void Threads_SetPriority(tThread *Thread, int Pri) } /** - * \fn tThread *Threads_CloneTCB(Uint *Err, Uint Flags) * \brief Clone the TCB of the current thread - * \param Err Error pointer * \param Flags Flags for something... (What is this for?) */ -tThread *Threads_CloneTCB(Uint *Err, Uint Flags) +tThread *Threads_CloneTCB(Uint Flags) { tThread *cur, *new; int i; @@ -246,7 +244,7 @@ tThread *Threads_CloneTCB(Uint *Err, Uint Flags) // Allocate and duplicate new = malloc(sizeof(tThread)); - if(new == NULL) { *Err = -ENOMEM; return NULL; } + if(new == NULL) { errno = -ENOMEM; return NULL; } memcpy(new, cur, sizeof(tThread)); new->CurCPU = -1; @@ -309,8 +307,7 @@ tThread *Threads_CloneTCB(Uint *Err, Uint Flags) } /** - * \fn tThread *Threads_CloneTCB(Uint *Err, Uint Flags) - * \brief Clone the TCB of the current thread + * \brief Clone the TCB of the kernel thread */ tThread *Threads_CloneThreadZero(void) {