Page MenuHomePhabricator

Add means to handle negative capabilities in thread safety annotations
ClosedPublic

Authored by PiRK on Aug 25 2021, 12:37.

Details

Summary

This commit is separated from #19238, and it adds support of Negative Capabilities in the Clang Thread Safety Analysis attributes.

Negative requirements are an alternative EXCLUDES [LOCKS_EXCLUDED] that provide a stronger safety guarantee. A negative requirement uses the REQUIRES [EXCLUSIVE_LOCKS_REQUIRED] attribute, in conjunction with the ! operator, to indicate that a capability should not be held.

This is a backport of core#19249

Test Plan

ninja