In resume() within swtch.s there is a temporarily switch to the 'idle thread', 
even when the actual context switch goes from one real thread to another.

    163         !
    164         ! Temporarily switch to idle thread's stack
    165         !
    166         ldn     [%i1 + CPU_IDLE_THREAD], %o0    ! idle thread pointer
    167         ldn     [%o0 + T_SP], %o1               ! get onto idle thread 
stack
    168         sub     %o1, SA(MINFRAME), %sp          ! save room for ins and 
locals
    169         clr     %fp
    170 
    171         !
    172         ! Set the idle thread as the current thread
    173         !
    174         mov     THREAD_REG, %l3                 ! save %g7 (current 
thread)
    175         mov     %o0, THREAD_REG                 ! set %g7 to idle
    176         stn     %o0, [%i1 + CPU_THREAD]         ! set CPU's thread to 
idle

Is this a real switch to the idle thread, I mean, is the idle_enter() function 
called in disp.c ?
 
 
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to