On Sep 12, 2013, at 5:07 PM, Ethan Jackson <et...@nicira.com> wrote:
>> + * Rules >> + * ----- >> + * >> + * A rule 'rule' may be accessed without a risk of being freed by code that >> + * holds a read-lock or write-lock on 'cls->rwlock' or that owns a >> reference to >> + * 'rule->ref_count' (or both). Code that needs to hold onto a rule for a >> + * while should take 'cls->rwlock', find the rule it needs, increment >> + * 'rule->ref_count' with ofproto_rule_ref(), and drop 'cls->rwlock'. >> + * >> + * 'rule->ref_count' protects 'rule' from being freed. It doesn't protect >> the >> + * rule from being deleted from 'cls' (that's 'cls->rwlock') and it doesn't >> + * protect members of 'rule' from modification (that's 'rule->rwlock'). /s/rule->rwlock/rule->mutex/
_______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev