https://github.com/melver created 
https://github.com/llvm/llvm-project/pull/185173

Introduce two new attributes with a weaker ownership model than
guarded_by: writing requires all listed capabilities to be held
exclusively, while reading only requires at least one to be held.
This is sound because any writer must hold all capabilities, so
holding any one of them guarantees at least shared (read) access.

This synchronization pattern is frequently used where the underlying
lock implementation does not support real reader locking, and instead
several lock "shards" are used to reduce contention for readers. For
example, the Linux kernel makes frequent use of this pattern [1].

[1] 
https://lore.kernel.org/all/[email protected]/



_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to