Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

Question about uclinux on nios

I'm studying nios and uclinux and met a question when I read source code in linux-2.0.x on cvs.uclinux.org.

The question is:

At the entry of sys_fork and sys_vfork, why use SAVE_LAST_WINDOW and STORE_WINDOW to store essential reg info? but at the entry of sys_clone, use FLUSH_WINDOWS. From the codes of the same part of sparcnommu, it use the method similar to FLUSH_WINDOWS to store essential reg info at the entry of sys_fork, sys_vfork, sys_clone.

So why use SAVE_LAST_WINDOW and STORE_WINDOW but not FLUSH_WINDOWS in nios porting? and what it means the spare_reg_window variable in thread_struct struct in asm-niosnommu/processor.h?

thanks!

2 Replies