git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Division bug hidden, now only shows when 64-bit division is needed
[tpg/acess2.git]
/
Kernel
/
threads.c
diff --git
a/Kernel/threads.c
b/Kernel/threads.c
index
a947169
..
ba0f430
100644
(file)
--- a/
Kernel/threads.c
+++ b/
Kernel/threads.c
@@
-173,6
+173,7
@@
tThread *Threads_CloneTCB(Uint *Err, Uint Flags)
*Err = -ENOMEM;
return NULL;
}
*Err = -ENOMEM;
return NULL;
}
+ memcpy(new, cur, sizeof(tThread));
new->Next = NULL;
new->IsLocked = 0;
new->Next = NULL;
new->IsLocked = 0;
@@
-184,8
+185,7
@@
tThread *Threads_CloneTCB(Uint *Err, Uint Flags)
new->PTID = cur->TID;
// Clone Name
new->PTID = cur->TID;
// Clone Name
- new->ThreadName = malloc(strlen(cur->ThreadName)+1);
- strcpy(new->ThreadName, cur->ThreadName);
+ new->ThreadName = strdup(cur->ThreadName);
// Set Thread Group ID (PID)
if(Flags & CLONE_VM)
// Set Thread Group ID (PID)
if(Flags & CLONE_VM)
UCC
git Repository :: git.ucc.asn.au