However here, we must keep the incrementation at the end of the loop, because of a possible corner case (a loop-break which takes place when we reach the last element of the list, but NextEntry already points to its head because of the cyclicity of the list) with the following 'if'-test made just after the loop.
svn path=/branches/ros-csrss/; revision=57867
CsrLockedReferenceProcess(CurrentProcess);
*CsrProcess = CurrentProcess;
}
CsrLockedReferenceProcess(CurrentProcess);
*CsrProcess = CurrentProcess;
}
/* Return the result */
return Status;
}
/* Return the result */
return Status;
}
/* Get the Process */
CurrentThread = CONTAINING_RECORD(NextEntry, CSR_THREAD, HashLinks);
/* Get the Process */
CurrentThread = CONTAINING_RECORD(NextEntry, CSR_THREAD, HashLinks);
- /* Move to the next entry */
- NextEntry = NextEntry->Flink;
-
/* Check for PID Match */
if ((CurrentThread->ClientId.UniqueThread == Tid) &&
!(CurrentThread->Flags & CsrThreadTerminated))
/* Check for PID Match */
if ((CurrentThread->ClientId.UniqueThread == Tid) &&
!(CurrentThread->Flags & CsrThreadTerminated))
/* Get out of here */
break;
}
/* Get out of here */
break;
}
+
+ /* Move to the next entry */
+ NextEntry = NextEntry->Flink;
}
/* Nothing found if we got back to the list */
}
/* Nothing found if we got back to the list */