git: sensor: Utilize LOCK_INITIALIZER

Sepherosa Ziehau sephe at crater.dragonflybsd.org
Sun Mar 22 17:48:53 PDT 2015


commit 161d4e60d6ab1b242cd0bba1712a9525cb8ac45a
Author: Sepherosa Ziehau <sephe at dragonflybsd.org>
Date:   Sat Mar 21 22:23:42 2015 +0800

    sensor: Utilize LOCK_INITIALIZER
    
    The cmpset for lock initialization is _not_ safe (it requires at least
    3 states and a spin loop, which is obviously an overkill when compared
    w/ LOCK_INITIALIZER).

Summary of changes:
 sys/kern/kern_sensors.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/161d4e60d6ab1b242cd0bba1712a9525cb8ac45a


-- 
DragonFly BSD source repository


More information about the Commits mailing list