Actions
Bug #1260
openSome model comments for 39_7 are implemented incorrectly
Start date:
05/20/2011
Due date:
% Done:
0%
Estimated time:
Detected in build:
svn
Platform:
Published in build:
Description
As it was noticed by Alexey there are a lot of warnings concerned with 39_7 model comments:
error-trace-visualizer: WARNING: Incorrect format of the model comment ' /* LDV_COMMENT_ASSERT Lock should be in a free tate*/\'. error-trace-visualizer: WARNING: Incorrect format of the model comment ' /* LDV_COMMENT_CHANGE_STATE Goto locked state*/\' ...
So first of all when somebody implement a model see on error trace visualizer log please! Sometimes it says something useful like in this case. In particular these messages are arisen due to '\' at the end of line that comes from their macro nature:
#define __ldv_spin_lock() \ do {\ /* LDV_COMMENT_ASSERT Lock should be in a free state*/\ ldv_assert(ldv_lock_TEMPLATE==1);\ ...
Unfortunately we haven't much experience in model comments creating and thus may think that they will work in using macros. But this isn't the case! Because if you'll see in error trace you'll find out that all constructions obtained from model macro expansion point out to the same line in source code that in turn doesn't related with macro model comment lines at all.
So if you want to use model comments do not put them inside macros! I will add this rule to our model design guide. But 39_7 model should be fixed a bit nevertheless. I propose that macros should be replaced with corresponding functions.
Moreover since model comments don't work we cannot put this model to the 4th level ;)
Actions