|
From: Bart V. A. <bva...@ac...> - 2010-01-29 09:46:39
|
On Fri, Jan 29, 2010 at 8:15 AM, Konstantin Serebryany <kon...@gm...> wrote: > > 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. As far as I know the term 'cyclic barrier' is only used in the context of the Java programming language and not in any document about POSIX barriers. So this terminology might be confusing for who's familiar with POSIX threads but not with Java. Bart. |