<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Hang Su,<div><br></div><div>"current" is a Linux thing. "current" is a per-processor global variable (it may actually be a macro, but it functions as a global variable) that points the current process (aka task_struct) that is scheduled on the processor that is executing the given code path.</div><div><br></div><div>If you are going to be doing a lot of Linux kernel development, I highly recommend that you get a copy of "Understanding the Linux Kernel" by Bovet & Cesati (published by O'Reilly). It has all this sort of information and is a great reference.</div><div><br></div><div>-Glenn</div><div><br></div><div><br><div><div>On Feb 17, 2012, at 10:39 AM, Hang Su wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi All:<br><br>I am finding the definition of a global variable<b> current</b> used inside scheduler_tick() under /kernel/sched.c. But I did not get where it is.<br><br>Thanks. <br>
_______________________________________________<br>litmus-dev mailing list<br><a href="mailto:litmus-dev@lists.litmus-rt.org">litmus-dev@lists.litmus-rt.org</a><br>https://lists.litmus-rt.org/listinfo/litmus-dev<br></blockquote></div><br></div></body></html>