|
From: Konstantin S. <kon...@gm...> - 2010-01-29 07:15:32
|
On Fri, Jan 29, 2010 at 10:12 AM, Bart Van Assche <bva...@ac...>wrote: > On Thu, Jan 28, 2010 at 8:17 PM, Konstantin Serebryany > <kon...@gm...> wrote: > > I again forgot that pthread_barrier is cyclic (resettable). > > imho this is error prone and dull, but that's what we have. > > I think we will need two annotations to fully support it: > > // inserted before the actual barrier_init code > > ANNOTATE_CYCLIC_BARRIER_INIT(obj, n) > > // inserted before the actual barrier_wait code. > > ANNOTATE_CYCLIC_BARRIER_WAIT(obj) > > Hello Konstantin, > > Why do feel that there is a need to tell a thread-checking tool on > beforehand whether a barrier will be used only once or multiple times > There is not such need. I think the name should contain 'CYCLIC' to make it clear that the annotation supports cyclic barriers. It will of course work with non-resettable barriers as well. --kcc > ? > > Bart. > |