DragonFly-2.3.2.55.g33b0b master sys/conf files sys/kern kern_mutex.c sys/sys mutex.h mutex2.h

Matthew Dillon dillon at crater.dragonflybsd.org
Wed Jul 15 11:40:29 PDT 2009


commit 33b0b87c7f75846a43b41baa24ae0d170d110724
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Wed Jul 15 11:29:43 2009 -0700

    MPSAFE - Add a set of general blocking/spinnable mutex functions.
    
    These locks are intended to eventually replace lockmgr locks for most
    use cases.
    
    * Optimized based on in-line atomic_cmpset_int() calls with fallback call.
    
    * Recursive shared and exclusive locks.  Downgrading, and non-blocking
      upgrading.
    
    * Interlocked wakeup flags.
    
    * Serial wakeup for exclusive waiters (i.e. optimal in the face of a large
      number of waiting threads).  Mass-wakeup for shared waiters.
    
    * Additional entry points for spinning.
    
    * Ref-count support, separate from lock count.

Summary of changes:
 sys/conf/files        |    1 +
 sys/kern/kern_mutex.c |  356 +++++++++++++++++++++++++++++++++++++++++++++++++
 sys/sys/mutex.h       |   97 +++++++++++++
 sys/sys/mutex2.h      |  227 +++++++++++++++++++++++++++++++
 4 files changed, 681 insertions(+), 0 deletions(-)
 create mode 100644 sys/kern/kern_mutex.c
 create mode 100644 sys/sys/mutex.h
 create mode 100644 sys/sys/mutex2.h

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/33b0b87c7f75846a43b41baa24ae0d170d110724


-- 
DragonFly BSD source repository





More information about the Commits mailing list