cvs commit: src/sys/kern kern_synch.c src/sys/sys systm.h

John Baldwin jhb at FreeBSD.org
Thu Dec 29 12:57:48 PST 2005


jhb         2005-12-29 20:57:45 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             kern_synch.c 
    sys/sys              systm.h 
  Log:
  Add a new function msleep_spin() which is a slightly stripped down version
  of msleep().  msleep_spin() doesn't support changing the priority of the
  thread while it is asleep nor does it support interruptible sleeps (PCATCH)
  or the PDROP flag.  It does support timeouts however.  It differs from
  msleep() in that the passed in mutex is a spin mutex.  This means one can
  use msleep_spin() and wakeup() with a spin mutex similar to msleep() and
  wakeup() with a regular mutex.  Note that the spin mutex in question needs
  to come before sched_lock and the sleepq locks in lock order.
  
  Revision  Changes    Path
  1.272     +164 -0    src/sys/kern/kern_synch.c
  1.237     +1 -0      src/sys/sys/systm.h


More information about the cvs-src mailing list