From mboxrd@z Thu Jan 1 00:00:00 1970 From: hschauhan@nulltrace.org (Chauhan, Himanshu) Date: Tue, 4 Oct 2011 18:20:43 +0530 Subject: how does linux restores a thread's stack pointer, program counter and return address. In-Reply-To: References: Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi Smital, > I am keen to find out how does linux restores a thread's stack pointer, program counter and return address. Isn't it that each thread has a different task_struct and at schedule r29 is reloaded from its own independent task_struct? Also, while scheduling pc and r31 are stored at the independent stack? Anyways, I think if you ask this question at Linux MIPS mailing list, people might shed more light on it. -Himanshu