[llvm-commits] Please review: adding Function attribute "ThreadSafety"

Kostya Serebryany kcc at google.com
Wed Mar 14 18:08:14 PDT 2012


Hello,

I would like to add one more function attribute: "ThreadSafety".
Functions with this attribute will be instrumented by run-time
thread-safety analysis tools (e.g. with ThreadSanitizer).
This is similar to "AddressSafety" attribute used by AddressSanitizer (and
SAFECode?).

Clang already has the attribute
"__attribute__((no_thread_safety_analysis))" which is used to disable
static thread-safety analysis.
http://clang.llvm.org/docs/LanguageExtensions.html#threadsafety
In a separate change we will teach clang to unset ThreadSafety
when no_thread_safety_analysis is present.
(exactly as we do for no_address_safety_analysis and AddressSafety)

Please review.

Thanks,

--kcc

http://codereview.appspot.com/5828043
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120314/0ef25d62/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: issue5828043_5001.diff
Type: application/octet-stream
Size: 4451 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120314/0ef25d62/attachment.obj>


More information about the llvm-commits mailing list