Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Jul 2001 15:06:57 -0700 (PDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/kern kern_synch.c src/sys/sys systm.h
Message-ID:  <200107312206.f6VM6v670782@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
jhb         2001/07/31 15:06:57 PDT

  Modified files:
    sys/kern             kern_synch.c 
    sys/sys              systm.h 
  Log:
  Apply the cluebat to myself and undo the await() -> mawait() rename.  The
  asleep() and await() functions split the functionality of msleep() up into
  two halves.  Only the asleep() half (which is what puts the process on the
  sleep queue) actually needs the lock usually passed to msleep() held to
  prevent lost wakeups.  await() does not need the lock held, so the lock
  can be released prior to calling await() and does not need to be passed in
  to the await() function.  Typical usage of these functions would be as
  follows:
  
          mtx_lock(&foo_mtx);
          ... do stuff ...
          asleep(&foo_cond, PRIxx, "foowt", hz);
          ...
          mtx_unlock&foo_mtx);
          ...
          await(-1, -1);
  
  Inspired by:	dillon on the couch at Usenix
  
  Revision  Changes    Path
  1.150     +16 -32    src/sys/kern/kern_synch.c
  1.147     +2 -3      src/sys/sys/systm.h


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107312206.f6VM6v670782>