DragonFly BSD
DragonFly commits List (threaded) for 2005-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

cvs commit: src/sys/kern lwkt_token.c src/sys/sys thread2.h


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 19 Jun 2005 14:50:50 -0700 (PDT)

dillon      2005/06/19 14:50:50 PDT

DragonFly src repository

  Modified files:
    sys/kern             lwkt_token.c 
    sys/sys              thread2.h 
  Log:
  Fix two bugs in the LWKT token code.
  
  (1) When releasing a token reference we cannot give away the token to
      another cpu if we are still holding it via a another reference.   This
      can cause recursive token references to silently fail when the inner
      reference is released.  It is unclear where such references exist and
      a temporary printf has been added to identify occurances.
  
  (2) When obtaining a token reference if the underlying token was not owned
      by the current cpu we spun to gain ownership, but then failed to check
      whether the token was being held by a preempted thread.
  
      This can result in a preempting thread holding a token also being held
      by an underyling thread.  Theoretically, this case can only
      occur if the preempted thread was is the process of obtaining the
      token in question since otherwise (by definition) our cpu will already
      own the token.  On return the preempted thread will check and obtain
      ownership.  However, the situation is complex enough that we really
      need to check unconditionally.
  
  Revision  Changes    Path
  1.16      +83 -40    src/sys/kern/lwkt_token.c
  1.20      +3 -0      src/sys/sys/thread2.h


http://www.dragonflybsd.org/cvsweb/src/sys/kern/lwkt_token.c.diff?r1=1.15&r2=1.16&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/sys/thread2.h.diff?r1=1.19&r2=1.20&f=u



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]