Hi, <div>I&#39;m totally new to kernel code, just trying to understand the basics of the core subsystems.</div><div>During the do_fork call, there is a call to dup_task_struct, which in turn calls setup_thread_stack. </div>
<div>What&#39;s  this call supposed to do? Inside I can see a call to the &quot;task_thread_info&quot; macro, but I don&#39;t quite understand it:</div><div><br></div><div>#define task_thread_info(task)<span class="Apple-tab-span" style="white-space:pre">        </span>((struct thread_info *)(task)-&gt;stack)</div>
<div><br></div><div>can a task_struct be cast to a thread_info? perhaps my C knowledge should be improved..I know :(</div><div><br></div><div>Sorry for the trivial question..just trying to understand :)</div><div><br>Regards,</div>
<div><br></div><div>Francesco</div><div><br></div>