C and C++


CONCURRENCY.THREADLOCAL : Use of Thread Local

要旨

A use of the _Thread_local storage class specifier, or of features defined in <threads.h>.

プロパティ

クラス名 Use of Thread Local
日本語クラス名 Use of Thread Local
クラス分類 スタイル (style)
ニーモニック CONCURRENCY.THREADLOCAL
カテゴリー
MisraC2023 MisraC2023:1.4 Emergent language features shall not be used
Misra2012 Misra2012:1.4 Emergent language features shall not be used
CERT-C CERT-C:MSC23-C Beware of vendor-specific library and language differences
対応言語 C および C++ で利用可能です。
有効/無効設定 このワーニングクラスのチェックはデフォルトで無効になっています。チェックを有効にするにはプロジェクト設定ファイル (configuration file)に以下の WARNING_FILTER ルールを追加してください。
WARNING_FILTER += allow class="Use of Thread Local"

_Thread_local int tls_g; /* 'Use of Thread Local' warning issued here */
int normal_g;

void f(){
    tls_g = 12;
    normal_g = 34;
}

関連のある設定ファイルパラメータ

設定ファイルの以下のパラメータがこのワーニングクラスのチェックに影響します。