r204350 - Replacing the exclusive_lock_function, shared_lock_function and unlock_function attributes with the acquire_capability and release_capability attributes. The old spellings will continue to work, but the underlying semantic attributes have been replaced.

Aaron Ballman aaron at aaronballman.com
Thu Mar 20 15:55:06 PDT 2014


On Thu, Mar 20, 2014 at 6:48 PM, Delesley Hutchins <delesley at google.com> wrote:
> The analysis currently has a single unlock_function attribute, which
> will unlock both exclusive and shared locks.  There's a feature
> request to add shared_unlock_function and exclusive_unlock_function
> attributes.  (These should issue a warning if they are used to unlock
> the wrong kind of capability.) Any chance you could wrap those up into
> the unlock_capability attribute?

Right now, we have release_capability, release_shared_capability and
release_generic_capability. I think the intention was that
release_capability == exclusive_unlock_function,
release_shared_capability == shared_unlock_function, and
release_generic_capability == unlock_function. If you agree with that
mapping, I think it should be possible to implement (I'll run the
patch by you before committing though, just to be sure the semantics
are what you're looking for).

~Aaron



More information about the cfe-commits mailing list