cvs commit: src/sys/kern lwkt_thread.c
    Matthew Dillon 
    dillon at crater.dragonflybsd.org
       
    Sat Dec 10 10:50:57 PST 2005
    
    
  
dillon      2005/12/10 10:50:36 PST
DragonFly src repository
  Modified files:
    sys/kern             lwkt_thread.c 
  Log:
  Fix another interesting bug.  td_threadq is shared by the LWKT scheduler,
  tsleep, and port-blocking code.  Because of this separate flags exist to
  indicate which queue the thread currently resides on and careful sanity
  checks were added to prevent corruption.
  
  The thread scheduler will not enqueue a thread that is sitting on one of
  these other queues.  This commit fixes a bug where the preemption code
  would still preemptively switch into the thread even when the enqueue fails,
  causing an assertion to be hit in tsleep().
  
  This just goes to show that asserting on supposedly impossible conditions is
  a good idea :-).
  
  Reported-by: Stefan Krueger <skrueger at xxxxxxxxxxxxxxxx>
  
  Revision  Changes    Path
  1.90      +12 -6     src/sys/kern/lwkt_thread.c
http://www.dragonflybsd.org/cvsweb/src/sys/kern/lwkt_thread.c.diff?r1=1.89&r2=1.90&f=u
    
    
More information about the Commits
mailing list