I have several questions about the thread scheduling in OpenSolaris, and wish 
you could help me making everything clear:

1, in /ust/common/sys/Thread.h, there is a line of code 
      
         "extern struct _kthread t0;  /* the scheduler thread */"
    
    after looking around, i found 't0' was created when the system boots up, 
and never exited. It's privilege is 99-3. However, i can not find out which 
code it will execute when it is swtched to CPUs. Will t0 run after booting, or 
just run once at the very beginning of the system?

2, In /uts/common/disp/Thread.c. 
    We know that swtch() calls thread_unpin() when current thead is an 
interrupt thread, and its interrupted thread is not null. In thread_unpin(), we 
use intr_passivate() to get state from interrupt thread for the one it 
interrupted. However I only find intr_passivate() for i386pc architechture. I 
want to know does this function have an SPARC code? Where it is?
-- 
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to