git: nmalloc - Fix depot race - this should fix remaining issues with firefox.

Matthew Dillon dillon at crater.dragonflybsd.org
Mon Oct 11 12:25:34 PDT 2010


commit ebe0d3612773443a8bf0158503b9597cf70acd03
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Mon Oct 11 12:21:32 2010 -0700

    nmalloc - Fix depot race - this should fix remaining issues with firefox.
    
    * nmalloc was accidently calling the libc _pthread_spin_lock() stub
      even when threaded, causing all depot operations to race.  No actual
      lock was being acquired.
    
      Change it over to the internal _SPINLOCK() API.
    
    * Expand libthread_xu's base spinlocks from 128 to 256 and use those
      for the depot lock.  Note that the depot[] array can be upwards of
      80 elements so lets not take any chances.
    
    Reported-by: Pierre Abbat <phma at phma.optus.nu>, others

Summary of changes:
 lib/libc/stdlib/nmalloc.c              |   18 +++++++++---------
 lib/libthread_xu/thread/thr_spinlock.c |    2 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/ebe0d3612773443a8bf0158503b9597cf70acd03


-- 
DragonFly BSD source repository





More information about the Commits mailing list