Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Mar 2007 16:27:11 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/kern kern_lock.c kern_mutex.c kern_rwlock.c kern_sx.c src/sys/sys lock.h
Message-ID:  <200703091627.l29GRB8X078078@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
jhb         2007-03-09 16:27:11 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             kern_lock.c kern_mutex.c kern_rwlock.c 
                         kern_sx.c 
    sys/sys              lock.h 
  Log:
  Add two new function pointers 'lc_lock' and 'lc_unlock' to lock classes.
  These functions are intended to be used to drop a lock and then reacquire
  it when doing an sleep such as msleep(9).  Both functions accept a
  'struct lock_object *' as their first parameter.  The 'lc_unlock' function
  returns an integer that is then passed as the second paramter to the
  subsequent 'lc_lock' function.  This can be used to communicate state.
  For example, sx locks and rwlocks use this to indicate if the lock was
  share/read locked vs exclusive/write locked.
  
  Currently, spin mutexes and lockmgr locks do not provide working lc_lock
  and lc_unlock functions.
  
  Revision  Changes    Path
  1.106     +19 -3     src/sys/kern/kern_lock.c
  1.185     +40 -0     src/sys/kern/kern_mutex.c
  1.18      +33 -0     src/sys/kern/kern_rwlock.c
  1.38      +33 -0     src/sys/kern/kern_sx.c
  1.65      +9 -0      src/sys/sys/lock.h



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