[BACK]Return to locore.S CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / arch / i386 / i386

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/arch/i386/i386/locore.S between version 1.1.2.6 and 1.1.2.7

version 1.1.2.6, 2002/12/23 16:15:28 version 1.1.2.7, 2002/12/31 01:03:47
Line 1683  ENTRY(cpu_switch)
Line 1683  ENTRY(cpu_switch)
 1:  1:
 #endif /* DEBUG */  #endif /* DEBUG */
   
         movl    CPUVAR(CURLWP),%esi          movl    16(%esp),%esi           # current
   
         /*          /*
          * Clear curlwp so that we don't accumulate system time while idle.           * Clear curlwp so that we don't accumulate system time while idle.
Line 1976  switch_return:
Line 1976  switch_return:
         popl    %ebx          popl    %ebx
         ret          ret
   
 #ifdef DIAGNOSTIC  
 NENTRY(preempt_error)  
         pushl   $1f  
         call    _C_LABEL(panic)  
         /* NOTREACHED */  
 1:      .asciz  "cpu_preempt"  
 #endif /* DIAGNOSTIC */  
   
 /*  /*
  * void cpu_preempt(struct lwp *current, struct lwp *next)   * void cpu_switchto(struct lwp *current, struct lwp *next)
  * Switch to the specified next LWP.   * Switch to the specified next LWP.
  */   */
 ENTRY(cpu_preempt)  ENTRY(cpu_switchto)
         pushl   %ebx          pushl   %ebx
         pushl   %esi          pushl   %esi
         pushl   %edi          pushl   %edi
Line 1999  ENTRY(cpu_preempt)
Line 1991  ENTRY(cpu_preempt)
         pushl   $2f          pushl   $2f
         call    _C_LABEL(panic)          call    _C_LABEL(panic)
         /* NOTREACHED */          /* NOTREACHED */
 2:      .asciz  "not splsched() in cpu_preempt!"  2:      .asciz  "not splsched() in cpu_switchto!"
 1:  1:
 #endif /* DEBUG */  #endif /* DEBUG */
   
         movl    CPUVAR(CURLWP),%esi          movl    16(%esp),%esi           # current
         movl    20(%esp),%edi           # next          movl    20(%esp),%edi           # next
   
         /*          /*
Line 2012  ENTRY(cpu_preempt)
Line 2004  ENTRY(cpu_preempt)
          * the correct queue if it happens to get called from the spllower()           * the correct queue if it happens to get called from the spllower()
          * below and changes the priority.  (See corresponding comment in           * below and changes the priority.  (See corresponding comment in
          * usrret()).           * usrret()).
            *
            * XXX Is this necessary?  We know we won't go idle.
          */           */
         movl    $0,CPUVAR(CURLWP)          movl    $0,CPUVAR(CURLWP)
   
 preempt_dequeue:  
         /*          /*
          * We're running at splhigh(), but it's otherwise okay to take           * We're running at splhigh(), but it's otherwise okay to take
          * interrupts here.           * interrupts here.
          */           */
         sti          sti
   
         movzbl  L_PRIORITY(%edi),%eax  
 #ifdef DIAGNOSTIC  
         shrl    $2,%eax  
         btl     %eax,_C_LABEL(sched_whichqs)  
         jnc     _C_LABEL(preempt_error)  
 #endif /* DIAGNOSTIC */  
         movl    L_BACK(%edi),%edx       # unlink process  
         movl    $0,L_BACK(%edi)         # zap reverse link to indicate off list  
         movl    L_FORW(%edi),%ecx  
         movl    %ecx,L_FORW(%edx)  
         movl    %edx,L_BACK(%ecx)  
         cmpl    %ecx,%edx               # q still has something?  
         jne     3f  
 #ifndef DIAGNOSTIC  
         shrl    $2,%eax  
 #endif  
         btrl    %eax,_C_LABEL(sched_whichqs)    # no; clear bit  
   
 3:  
         /* Jump into the middle of cpu_switch */          /* Jump into the middle of cpu_switch */
         xorl    %eax,%eax          xorl    %eax,%eax
         jmp     switch_resume          jmp     switch_resume

Legend:
Removed from v.1.1.2.6  
changed lines
  Added in v.1.1.2.7

CVSweb <webmaster@jp.NetBSD.org>