|
From: Bart V. A. <bva...@ac...> - 2010-07-05 10:13:51
|
On Mon, Jul 5, 2010 at 11:32 AM, Konstantin Serebryany <kon...@gm...> wrote: > > +da...@go... > Julian, Bart, > > I've prepared a (draft) message to libstdc++. > Please review it. You are welcome to edit it directly too. > http://code.google.com/p/data-race-test/wiki/AtomicReferenceCounting While I welcome such an initiative, I have a few comments: - Asking the libstdc++ maintainers to use ANNOTATE_HAPPENS_BEFORE() and ANNOTATE_HAPPENS_AFTER() is not an option as long as there exist three different implementations of these macros (one in ThreadSanitizer, one in Helgrind and one in DRD). - Asking to implement a function __decrement_refcount() will only help if this function is never inlined. That will cause a slight slowdown of every reference counting implementation. I'm afraid that such a request will not be accepted by the libstdc++ maintainers. - A nitpick: are you sure that the following statement is correct: "However, it is hard or impossible to interpret raw atomic instructions as synchronization" ? While - at least in DRD - it is easy to associate ordering semantics with all atomic instructions, doing so would cause many real races not to be reported. Bart. |