cvs commit: src/sys/kern kern_mutex.c src/sys/sys mutex.h

John Baldwin jhb at FreeBSD.org
Wed Jan 5 13:13:28 PST 2005


jhb         2005-01-05 21:13:27 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             kern_mutex.c 
    sys/sys              mutex.h 
  Log:
  Rework the optimization for spinlocks on UP to be slightly less drastic and
  turn it back on.  Specifically, the actual changes are now less intrusive
  in that the _get_spin_lock() and _rel_spin_lock() macros now have their
  contents changed for UP vs SMP kernels which centralizes the changes.
  Also, UP kernels do not use _mtx_lock_spin() and no longer include it.  The
  UP versions of the spin lock functions do not use any atomic operations,
  but simple compares and stores which allow mtx_owned() to still work for
  spin locks while removing the overhead of atomic operations.
  
  Tested on:      i386, alpha
  
  Revision  Changes    Path
  1.152     +2 -8      src/sys/kern/kern_mutex.c
  1.74      +26 -5     src/sys/sys/mutex.h


More information about the cvs-src mailing list