Am Mittwoch, 22. Mai 2019, 11:37:40 CEST schrieb Julia Lawall: > On Wed, 22 May 2019, Philipp Reisner wrote: > > Hi, > > > > [...] > > > > I love the whole idea, but gave up working on such a things myself. > > > > > > Because clang analysis wants it to be global! > > > > > > A __protected_by() annotation sounds like a good idea. I don't really > > > care about the format too much. If the information were in a comment > > > and we could parse with a perl script that would be fine. Or we could > > > > > > do: > > > struct foo { > > > > > > struct mutex lock; > > > __start_protected(lock); > > > int a, b, c; > > > __end_protected(lock); > > > > > > }; > > > > Regarding the syntax I vote for a __protected_by(lock) instead of > > __start_protected(lock) / __end_protected(lock). > > What do you mean exactly, eg in the above example? > struct foo { struct mutex lock; int a __protected_by_(lock); int b __protected_by_(lock); }; cheers, Phil