On Tue, Mar 05, 2002 at 02:19:37PM +0530, Anurekh Saxena wrote: > hi, > could you tell me the role of "last" in the switch_to macro. > schedule() sends 'prev' as this parameter to so it could be used by > schedule_tail(). > I would like to know how 'prev' (i.e 'last' in switch_to) is different from > 'current', and how last is used in switch_to. You're looking at #define switch_to(prev,next,last) ... from 2.4. The last parameter in switch_to() is redundant and has been removed in 2.5. It obfuscates switch_to() in 2.4. Looking at the (sole) call of switch_to() in the 2.4 (or any other) kernel, we have: ... /* * This just switches the register state and the * stack. */ switch_to(prev, next, prev); __schedule_tail(prev); same_process: ... This has been cleaned up in 2.5. Cheers, Bill -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ IRC Channel: irc.openprojects.net / #kernelnewbies Web Page: http://www.kernelnewbies.org/