cvs commit: src/sys/kern kern_lock.c

Simon Schubert corecode at
Wed Jan 9 03:00:12 PST 2008

corecode    2008/01/09 02:59:12 PST

DragonFly src repository

  Modified files:
    sys/kern             kern_lock.c 
  Fix lockuninit.
  lockuninit was acquiring the spinlock embedded in struct lock, thus
  incrementing the per-thread spinlock count. However, spin_uninit does
  not decrement the count, resulting in a panic when trying to sleep
  ("lwkt_switch: still holding %d exclusive spinlocks!"). From now on,
  require that the caller already holds the struct lock in question so
  that lockuninit can rely on it being the sole owner of the lock.
  Lots of help from: corecode@, aggelos
  Comment from Aggelos: "That's what you get when commiting code without
  any in-tree users."
  Submitted-by: nant@
  Revision  Changes    Path
  1.27      +8 -2      src/sys/kern/kern_lock.c

More information about the Commits mailing list