tag:blogger.com,1999:blog-5246987755651065286.post1228237281630311474..comments2024-02-22T16:15:42.388-08:00Comments on cbloom rants: 05-30-12 - On C++ Atomic Fencescbloomhttp://www.blogger.com/profile/10714564834899413045noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-5246987755651065286.post-52634795697462268732012-06-12T11:53:23.057-07:002012-06-12T11:53:23.057-07:00Word up. Made new TOC :
http://cbloomrants.blogs...Word up. Made new TOC :<br /><br />http://cbloomrants.blogspot.com/2012/06/06-12-12-another-threading-post-index.htmlcbloomhttps://www.blogger.com/profile/10714564834899413045noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-60623138282058543992012-06-11T17:46:17.280-07:002012-06-11T17:46:17.280-07:00These posts are helpful. You should add them to yo...These posts are helpful. You should add them to your <a href="http://cbloomrants.blogspot.ca/2009/02/02-26-09-low-level-threading-table-of.html" rel="nofollow">table of contents</a> for low-level threading.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-78740279225719575782012-05-31T23:14:00.018-07:002012-05-31T23:14:00.018-07:00Guess that isn't quite right either since the ...Guess that isn't quite right either since the synchronization happens at the fence and not preceding the load..Brianhttps://www.blogger.com/profile/18061165495812067689noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-65524356488908559402012-05-31T16:27:05.206-07:002012-05-31T16:27:05.206-07:00I get the feeling that the C++ spec writers added ...I get the feeling that the C++ spec writers added fences more as an afterthought.<br /><br />A nitpick... An acquire fence makes some preceding load act like a load_acquire (the immediately preceding load might not access the same memory address as a store_release ).<br /><br />One thing I am curious about that the spec doesn't talk much about--- when is the compiler allowed to introduce a deadlock? Let's supposed that we have two threads that each publicize something and then wait for the other thread to publicize. The C++ spec isn't very clear on whether the compiler can reorder the load_acquires in the wait for publication loop above the store release.Brianhttps://www.blogger.com/profile/18061165495812067689noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-4892174502936065742012-05-31T13:35:52.282-07:002012-05-31T13:35:52.282-07:00Yeah, you can just pretend the $ is not there. It...Yeah, you can just pretend the $ is not there. It gets #define'd to different things for testing.<br /><br />My own C++0x-look-alike atomic layer accepts the $ as an additional argument and does nothing with it, so that I can move code between Relacy and production without touching it.<br /><br />(I also have an in-place Relacy-like test layer which uses real threads and real atomic ops, and in that case the $ does randomized thread switches and stalls to stress the code).cbloomhttps://www.blogger.com/profile/10714564834899413045noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-4469600517306365572012-05-31T13:29:49.021-07:002012-05-31T13:29:49.021-07:00That's a bit of Relacy magic to make the autom...That's a bit of Relacy magic to make the automatic enumeration of possible event orderings work.Fabian 'ryg' Giesenhttps://www.blogger.com/profile/13685994980026854143noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-28938644695032775492012-05-31T12:14:28.148-07:002012-05-31T12:14:28.148-07:00Potentially silly question: what's "($)&q...Potentially silly question: what's "($)"?Unknownhttps://www.blogger.com/profile/14315189513110054064noreply@blogger.com