nill out thread private storage pointer just after making it a task variable in
the new thread so that it will not point at the other thread's task variable
This commit is contained in:
@@ -107,6 +107,7 @@ static void createFunction(THREADFUNC func, void *parm)
|
||||
int tid = taskIdSelf();
|
||||
|
||||
taskVarAdd(tid,(int *)&papTSD);
|
||||
papTSD = 0;
|
||||
(*func)(parm);
|
||||
taskVarDelete(tid,(int *)&papTSD);
|
||||
free(papTSD);
|
||||
|
||||
Reference in New Issue
Block a user