[LITMUS^RT] A global variable definition

Glenn Elliott gelliott at cs.unc.edu
Fri Feb 17 16:50:16 CET 2012


Hi Hang Su,

"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.

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.

-Glenn


On Feb 17, 2012, at 10:39 AM, Hang Su wrote:

> Hi All:
> 
> I am finding the definition of a global variable current used inside scheduler_tick() under /kernel/sched.c. But I did not get where it is.
> 
> Thanks. 
> _______________________________________________
> litmus-dev mailing list
> litmus-dev at lists.litmus-rt.org
> https://lists.litmus-rt.org/listinfo/litmus-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20120217/8b70b8dc/attachment.html>


More information about the litmus-dev mailing list