So now let's write the code. You've gotta put up with my coding handwriting here.
What we're going to do is initialize k to our global thread index.
We're going to initialize chum to our next pointer, and then we're going to loop.
We're going to run this routine until we run into the end.
And the question is, what do we do at each stage? What do we set the new chum of k to?
现在让我们来编写代码。你得忍受我这里的代码书写笔迹。
我们要做的是初始化 k 到我们全局线程的索引。
我们要初始化chum到我们下一个指针，然后我们将循环。
我们要运行此例程，直到我们运行结束。
问题是，我们在每个阶段做什么？ 我们把k的新chum值设置为什么？