git: netisr barrier: Avoid lockless wakeup/tsleep race

Sepherosa Ziehau sephe at crater.dragonflybsd.org
Sun Jan 30 19:14:28 PST 2011


commit ca3321f80921e6398c9aa5a4c00811086e981d76
Author: Sepherosa Ziehau <sephe at dragonflybsd.org>
Date:   Mon Jan 31 11:09:35 2011 +0800

    netisr barrier: Avoid lockless wakeup/tsleep race
    
    Add a waiting state (NETISR_BR_WAITDONE), before it is set wakeup()
    will not be called.  And use atomic_cmpset_int() to do the state
    transition.
    
    With-help-from: dillon@

Summary of changes:
 sys/net/netisr.c |   28 ++++++++++++++++++++--------
 1 files changed, 20 insertions(+), 8 deletions(-)

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


-- 
DragonFly BSD source repository





More information about the Commits mailing list