> lock
> unhash
> unlock
> if (atomic_dec()) {
> free
> }
And the read side is:
lock
loopup
atomic_inc
unlock
With RCU, read side is:
loopup
atomic_inc
Write is:
lock /* protect against other writes */
unhash /* be careful with wmb()s here... */
unlock
call_rcu(if (atomic_dec()) free) /* ie. does this later */
Clear?
Rusty.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/