[BACK]Return to kern_sleepq.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / kern

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

Diff for /src/sys/kern/kern_sleepq.c between version 1.5.2.8 and 1.5.2.9

version 1.5.2.8, 2008/02/27 08:36:55 version 1.5.2.9, 2008/03/24 09:39:02
Line 1 
Line 1 
 /*      $NetBSD$        */  /*      $NetBSD$        */
   
 /*-  /*-
  * Copyright (c) 2006, 2007 The NetBSD Foundation, Inc.   * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
  * All rights reserved.   * All rights reserved.
  *   *
  * This code is derived from software contributed to The NetBSD Foundation   * This code is derived from software contributed to The NetBSD Foundation
Line 270  sleepq_block(int timo, bool catch)
Line 270  sleepq_block(int timo, bool catch)
   
         if (early) {          if (early) {
                 /* lwp_unsleep() will release the lock */                  /* lwp_unsleep() will release the lock */
                 lwp_unsleep(l);                  lwp_unsleep(l, true);
         } else {          } else {
                 if (timo)                  if (timo)
                         callout_schedule(&l->l_timeout_ch, timo);                          callout_schedule(&l->l_timeout_ch, timo);
Line 347  sleepq_wake(sleepq_t *sq, wchan_t wchan,
Line 347  sleepq_wake(sleepq_t *sq, wchan_t wchan,
  *      sleepq_unsleep() is called with the LWP's mutex held, and will   *      sleepq_unsleep() is called with the LWP's mutex held, and will
  *      always release it.   *      always release it.
  */   */
 void  u_int
 sleepq_unsleep(lwp_t *l)  sleepq_unsleep(lwp_t *l, bool cleanup)
 {  {
         sleepq_t *sq = l->l_sleepq;          sleepq_t *sq = l->l_sleepq;
         int swapin;          int swapin;
Line 358  sleepq_unsleep(lwp_t *l)
Line 358  sleepq_unsleep(lwp_t *l)
         KASSERT(l->l_mutex == sq->sq_mutex);          KASSERT(l->l_mutex == sq->sq_mutex);
   
         swapin = sleepq_remove(sq, l);          swapin = sleepq_remove(sq, l);
         sleepq_unlock(sq);  
   
         if (swapin)          if (cleanup) {
                 uvm_kick_scheduler();                  sleepq_unlock(sq);
                   if (swapin)
                           uvm_kick_scheduler();
           }
   
           return swapin;
 }  }
   
 /*  /*
Line 387  sleepq_timeout(void *arg)
Line 391  sleepq_timeout(void *arg)
                 return;                  return;
         }          }
   
         lwp_unsleep(l);          lwp_unsleep(l, true);
 }  }
   
 /*  /*

Legend:
Removed from v.1.5.2.8  
changed lines
  Added in v.1.5.2.9

CVSweb <webmaster@jp.NetBSD.org>