フィルターのクリア

RTW : Why is errorStatus in Release 14 SP3 & R2006b is declared differently?

3 ビュー (過去 30 日間)
venkat
venkat 2012 年 10 月 30 日
The errorStatus in R14 SP3 is declared as 'const' whereas from R2006b it is being declared as 'const volatile'. Why is it declared so? how can i avoid this change? please help...
  2 件のコメント
Kaustubha Govind
Kaustubha Govind 2012 年 10 月 30 日
What is the System Target File selected?
venkat
venkat 2012 年 10 月 31 日
ert

サインインしてコメントする。

採用された回答

Kaustubha Govind
Kaustubha Govind 2012 年 10 月 31 日
Not sure, but perhaps it is expected that there might be external hardware drivers that could update the errorStatus flag? I don't know if this can be avoided - it is best to contact MathWorks Tech Support for this question to get an authoritative answer.
  2 件のコメント
venkat
venkat 2012 年 10 月 31 日
Got it. The volatile type specifier tells the compiler that some other thread can change the value unexpectedly and the compiler must not load the error flag into a register
To some extent this compromises the code optimisation, but whats more important is whether the compiler is referring the updated value.
Thank you KG & Mathworks Tech Support for your responses.
Kaustubha Govind
Kaustubha Govind 2012 年 11 月 2 日
venkat: Thanks for posting a more detailed explanation. :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAUTOSAR Blockset についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by