Hi -

Question #1
I was looking at the code of resume() at swtch.s. The %g7 resister seems to 
hold a pointer to the thread structure. Is that pointer to the user-level one 
or the kernel-level one? I have this question because of my following 
confussion; if %g7 holds a pointer to the kernel thread then somehow it needs 
to be not available to user-mode since this will violate process/kernel 
boundaries. On the other hand if it points to user-level structure, then it is 
not reasonable since that structure could be modified by user-mode. Clearly I 
am missing something here. I know that in SPARC there is this alternate global 
set. Does the kernel use that alternate global? Or does the kernel clear the 
%g7 register before getting to user mode? If this is the case, could someone 
point me to the place where this happen?

Question #2
Do changes of %g7 always indicate a thread context switch?

thanks,
-Haris
 
 
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to