sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget./translations/zh_CN/dev-tools/context-analysismodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/zh_TW/dev-tools/context-analysismodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/it_IT/dev-tools/context-analysismodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/ja_JP/dev-tools/context-analysismodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/ko_KR/dev-tools/context-analysismodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/pt_BR/dev-tools/context-analysismodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/sp_SP/dev-tools/context-analysismodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhH/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis.rsthKubh)}(hCopyright (C) 2025, Google LLC.h]hCopyright (C) 2025, Google LLC.}hhsbah}(h]h ]h"]h$]h&]hhuh1hhhhhhhhKubhtarget)}(h.. _context-analysis:h]h}(h]h ]h"]h$]h&]refidcontext-analysisuh1hhKhhhhhhubhsection)}(hhh](htitle)}(hCompiler-Based Context Analysish]hCompiler-Based Context Analysis}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hXxContext Analysis is a language extension, which enables statically checking that required contexts are active (or inactive) by acquiring and releasing user-definable "context locks". An obvious application is lock-safety checking for the kernel's various synchronization primitives (each of which represents a "context lock"), and checking that locking rules are not violated.h]hXContext Analysis is a language extension, which enables statically checking that required contexts are active (or inactive) by acquiring and releasing user-definable “context locks”. An obvious application is lock-safety checking for the kernel’s various synchronization primitives (each of which represents a “context lock”), and checking that locking rules are not violated.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hThe Clang compiler currently supports the full set of context analysis features. To enable for Clang, configure the kernel with::h]hThe Clang compiler currently supports the full set of context analysis features. To enable for Clang, configure the kernel with:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh literal_block)}(hCONFIG_WARN_CONTEXT_ANALYSIS=yh]hCONFIG_WARN_CONTEXT_ANALYSIS=y}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKhhhhubh)}(h'The feature requires Clang 22 or later.h]h'The feature requires Clang 22 or later.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hThe analysis is *opt-in by default*, and requires declaring which modules and subsystems should be analyzed in the respective `Makefile`::h](hThe analysis is }(hj5hhhNhNubhemphasis)}(h*opt-in by default*h]hopt-in by default}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj5ubh[, and requires declaring which modules and subsystems should be analyzed in the respective }(hj5hhhNhNubhtitle_reference)}(h `Makefile`h]hMakefile}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jQhj5ubh:}(hj5hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubj)}(h CONTEXT_ANALYSIS_mymodule.o := yh]h CONTEXT_ANALYSIS_mymodule.o := y}hjksbah}(h]h ]h"]h$]h&]hhuh1jhhhKhhhhubh)}(h/Or for all translation units in the directory::h]h.Or for all translation units in the directory:}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubj)}(hCONTEXT_ANALYSIS := yh]hCONTEXT_ANALYSIS := y}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKhhhhubh)}(hIt is possible to enable the analysis tree-wide, however, which will result in numerous false positive warnings currently and is *not* generally recommended::h](hIt is possible to enable the analysis tree-wide, however, which will result in numerous false positive warnings currently and is }(hjhhhNhNubj>)}(h*not*h]hnot}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjubh generally recommended:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubj)}(h"CONFIG_WARN_CONTEXT_ANALYSIS_ALL=yh]h"CONFIG_WARN_CONTEXT_ANALYSIS_ALL=y}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhK"hhhhubh)}(hhh](h)}(hProgramming Modelh]hProgramming Model}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK%ubh)}(hJThe below describes the programming model around using context lock types.h]hJThe below describes the programming model around using context lock types.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hjhhubhnote)}(hEnabling context analysis can be seen as enabling a dialect of Linux C with a Context System. Some valid patterns involving complex control-flow are constrained (such as conditional acquisition and later conditional release in the same function).h]h)}(hEnabling context analysis can be seen as enabling a dialect of Linux C with a Context System. Some valid patterns involving complex control-flow are constrained (such as conditional acquisition and later conditional release in the same function).h]hEnabling context analysis can be seen as enabling a dialect of Linux C with a Context System. Some valid patterns involving complex control-flow are constrained (such as conditional acquisition and later conditional release in the same function).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubh)}(hXContext analysis is a way to specify permissibility of operations to depend on context locks being held (or not held). Typically we are interested in protecting data and code in a critical section by requiring a specific context to be active, for example by holding a specific lock. The analysis ensures that callers cannot perform an operation without the required context being active.h]hXContext analysis is a way to specify permissibility of operations to depend on context locks being held (or not held). Typically we are interested in protecting data and code in a critical section by requiring a specific context to be active, for example by holding a specific lock. The analysis ensures that callers cannot perform an operation without the required context being active.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hjhhubh)}(hContext locks are associated with named structs, along with functions that operate on struct instances to acquire and release the associated context lock.h]hContext locks are associated with named structs, along with functions that operate on struct instances to acquire and release the associated context lock.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hjhhubh)}(hXContext locks can be held either exclusively or shared. This mechanism allows assigning more precise privileges when a context is active, typically to distinguish where a thread may only read (shared) or also write (exclusive) to data guarded within a context.h]hXContext locks can be held either exclusively or shared. This mechanism allows assigning more precise privileges when a context is active, typically to distinguish where a thread may only read (shared) or also write (exclusive) to data guarded within a context.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hjhhubh)}(hXThe set of contexts that are actually active in a given thread at a given point in program execution is a run-time concept. The static analysis works by calculating an approximation of that set, called the context environment. The context environment is calculated for every program point, and describes the set of contexts that are statically known to be active, or inactive, at that particular point. This environment is a conservative approximation of the full set of contexts that will actually be active in a thread at run-time.h]hXThe set of contexts that are actually active in a given thread at a given point in program execution is a run-time concept. The static analysis works by calculating an approximation of that set, called the context environment. The context environment is calculated for every program point, and describes the set of contexts that are statically known to be active, or inactive, at that particular point. This environment is a conservative approximation of the full set of contexts that will actually be active in a thread at run-time.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK=hjhhubh)}(haMore details are also documented `here `_.h](h!More details are also documented }(hj4hhhNhNubh reference)}(h?`here `_h]hhere}(hj>hhhNhNubah}(h]h ]h"]h$]h&]namehererefuri5https://clang.llvm.org/docs/ThreadSafetyAnalysis.htmluh1j<hj4ubh)}(h8 h]h}(h]hereah ]h"]hereah$]h&]refurijOuh1h֌ referencedKhj4ubh.}(hj4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKEhjhhubj)}(hX#Clang's analysis explicitly does not infer context locks acquired or released by inline functions. It requires explicit annotations to (a) assert that it's not a bug if a context lock is released or acquired, and (b) to retain consistency between inline and non-inline function declarations.h]h)}(hX#Clang's analysis explicitly does not infer context locks acquired or released by inline functions. It requires explicit annotations to (a) assert that it's not a bug if a context lock is released or acquired, and (b) to retain consistency between inline and non-inline function declarations.h]hX'Clang’s analysis explicitly does not infer context locks acquired or released by inline functions. It requires explicit annotations to (a) assert that it’s not a bug if a context lock is released or acquired, and (b) to retain consistency between inline and non-inline function declarations.}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKIhjhubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubh)}(hhh](h)}(hSupported Kernel Primitivesh]hSupported Kernel Primitives}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKOubh)}(hCurrently the following synchronization primitives are supported: `raw_spinlock_t`, `spinlock_t`, `rwlock_t`, `mutex`, `seqlock_t`, `bit_spinlock`, RCU, SRCU (`srcu_struct`), `rw_semaphore`, `local_lock_t`, `ww_mutex`.h](hBCurrently the following synchronization primitives are supported: }(hjhhhNhNubjR)}(h`raw_spinlock_t`h]hraw_spinlock_t}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jQhjubh, }(hjhhhNhNubjR)}(h `spinlock_t`h]h spinlock_t}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jQhjubh, }hjsbjR)}(h `rwlock_t`h]hrwlock_t}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jQhjubh, }hjsbjR)}(h`mutex`h]hmutex}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jQhjubh, }hjsbjR)}(h `seqlock_t`h]h seqlock_t}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jQhjubh, }(hjhhhNhNubjR)}(h`bit_spinlock`h]h bit_spinlock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jQhjubh , RCU, SRCU (}(hjhhhNhNubjR)}(h `srcu_struct`h]h srcu_struct}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jQhjubh), }(hjhhhNhNubjR)}(h`rw_semaphore`h]h rw_semaphore}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jQhjubh, }hjsbjR)}(h`local_lock_t`h]h local_lock_t}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jQhjubh, }hjsbjR)}(h `ww_mutex`h]hww_mutex}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jQhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKQhjhhubh)}(hXTo initialize variables guarded by a context lock with an initialization function (``type_init(&lock)``), prefer using ``guard(type_init)(&lock)`` or ``scoped_guard(type_init, &lock) { ... }`` to initialize such guarded members or globals in the enclosing scope. This initializes the context lock and treats the context as active within the initialization scope (initialization implies exclusive access to the underlying object).h](hSTo initialize variables guarded by a context lock with an initialization function (}(hjShhhNhNubhliteral)}(h``type_init(&lock)``h]htype_init(&lock)}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1j[hjSubh), prefer using }(hjShhhNhNubj\)}(h``guard(type_init)(&lock)``h]hguard(type_init)(&lock)}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1j[hjSubh or }(hjShhhNhNubj\)}(h*``scoped_guard(type_init, &lock) { ... }``h]h&scoped_guard(type_init, &lock) { ... }}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j[hjSubh to initialize such guarded members or globals in the enclosing scope. This initializes the context lock and treats the context as active within the initialization scope (initialization implies exclusive access to the underlying object).}(hjShhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKVhjhhubh)}(h For example::h]h For example:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK]hjhhubj)}(hstruct my_data { spinlock_t lock; int counter __guarded_by(&lock); }; void init_my_data(struct my_data *d) { ... guard(spinlock_init)(&d->lock); d->counter = 0; ... }h]hstruct my_data { spinlock_t lock; int counter __guarded_by(&lock); }; void init_my_data(struct my_data *d) { ... guard(spinlock_init)(&d->lock); d->counter = 0; ... }}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhK_hjhhubh)}(hX=Alternatively, initializing guarded variables can be done with context analysis disabled, preferably in the smallest possible scope (due to lack of any other checking): either with a ``context_unsafe(var = init)`` expression, or by marking small initialization functions with the ``__context_unsafe(init)`` attribute.h](hAlternatively, initializing guarded variables can be done with context analysis disabled, preferably in the smallest possible scope (due to lack of any other checking): either with a }(hjhhhNhNubj\)}(h``context_unsafe(var = init)``h]hcontext_unsafe(var = init)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j[hjubhC expression, or by marking small initialization functions with the }(hjhhhNhNubj\)}(h``__context_unsafe(init)``h]h__context_unsafe(init)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j[hjubh attribute.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKlhjhhubh)}(hXLockdep assertions, such as `lockdep_assert_held()`, inform the compiler's context analysis that the associated synchronization primitive is held after the assertion. This avoids false positives in complex control-flow scenarios and encourages the use of Lockdep where static analysis is limited. For example, this is useful when a function doesn't *always* require a lock, making `__must_hold()` inappropriate.h](hLockdep assertions, such as }(hjhhhNhNubjR)}(h`lockdep_assert_held()`h]hlockdep_assert_held()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jQhjubhX., inform the compiler’s context analysis that the associated synchronization primitive is held after the assertion. This avoids false positives in complex control-flow scenarios and encourages the use of Lockdep where static analysis is limited. For example, this is useful when a function doesn’t }(hjhhhNhNubj>)}(h*always*h]halways}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjubh require a lock, making }(hjhhhNhNubjR)}(h`__must_hold()`h]h __must_hold()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jQhjubh inappropriate.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKrhjhhubeh}(h]supported-kernel-primitivesah ]h"]supported kernel primitivesah$]h&]uh1hhjhhhhhKOubh)}(hhh](h)}(hKeywordsh]hKeywords}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hhhhhKzubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](single__guarded_by (C macro)c.__guarded_byhNtauh1jDhj3hhhNhNubhdesc)}(hhh](hdesc_signature)}(h __guarded_byh]hdesc_signature_line)}(h __guarded_byh]h desc_name)}(h __guarded_byh]h desc_sig_name)}(hj^h]h __guarded_by}(hjnhhhNhNubah}(h]h ]nah"]h$]h&]uh1jlhjhubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jfhjbhhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhK*ubah}(h]h ]h"]h$]h&]hhƌ add_permalinkuh1j`sphinx_line_type declaratorhj\hhhjhK*ubah}(h]jSah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jZhjhK*hjWhhubh desc_content)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjWhhhjhK*ubeh}(h]h ](cmacroeh"]h$]h&]domainjobjtypejdesctypejnoindex noindexentrynocontentsentryuh1jUhhhj3hNhNubh)}(h``__guarded_by (...)``h]j\)}(hjh]h__guarded_by (...)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j[hjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhK,hj3hhubh block_quote)}(h]struct member and globals attribute, declares variable only accessible within active context h]h)}(h\struct member and globals attribute, declares variable only accessible within active contexth]h\struct member and globals attribute, declares variable only accessible within active context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhK*hjubah}(h]h ]h"]h$]h&]uh1jhjhK*hj3hhubh container)}(hX**Parameters** ``...`` variable arguments **Description** Declares that the struct member or global variable is only accessible within the context entered by the given context lock. Read operations on the data require shared access, while write operations require exclusive access. .. code-block:: c struct some_state { spinlock_t lock; long counter __guarded_by(&lock); };h](h)}(h**Parameters**h]hstrong)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhK.hjubhdefinition_list)}(hhh]hdefinition_list_item)}(h``...`` variable arguments h](hterm)}(h``...``h]j\)}(hjh]h...}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j[hjubah}(h]h ]h"]h$]h&]uh1jhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhj ubh definition)}(hhh]h)}(hvariable argumentsh]hvariable arguments}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hKhj,ubah}(h]h ]h"]h$]h&]uh1j*hj ubeh}(h]h ]h"]h$]h&]uh1j hj)hKhjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hjQh]h Description}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhjubh)}(hDeclares that the struct member or global variable is only accessible within the context entered by the given context lock. Read operations on the data require shared access, while write operations require exclusive access.h]hDeclares that the struct member or global variable is only accessible within the context entered by the given context lock. Read operations on the data require shared access, while write operations require exclusive access.}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhK+hjubj)}(hYstruct some_state { spinlock_t lock; long counter __guarded_by(&lock); };h]hYstruct some_state { spinlock_t lock; long counter __guarded_by(&lock); };}hjvsbah}(h]h ]h"]h$]h&]hhƌforcelanguagejhighlight_args}uh1jhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhK/hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj3hhhNhNubjE)}(hhh]h}(h]h ]h"]h$]h&]entries](jQ__pt_guarded_by (C macro)c.__pt_guarded_byhNtauh1jDhj3hhhNhNubjV)}(hhh](j[)}(h__pt_guarded_byh]ja)}(h__pt_guarded_byh]jg)}(h__pt_guarded_byh]jm)}(hjh]h__pt_guarded_by}(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jlhjubah}(h]h ](jjeh"]h$]h&]hhuh1jfhjhhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhK;ubah}(h]h ]h"]h$]h&]hhjuh1j`jjhjhhhjhK;ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jZhjhK;hjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhjhK;ubeh}(h]h ](jmacroeh"]h$]h&]jjjjjjjjjuh1jUhhhj3hNhNubh)}(h``__pt_guarded_by (...)``h]j\)}(hjh]h__pt_guarded_by (...)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j[hjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhK=hj3hhubj)}(hdstruct member and globals attribute, declares pointed-to data only accessible within active context h]h)}(hcstruct member and globals attribute, declares pointed-to data only accessible within active contexth]hcstruct member and globals attribute, declares pointed-to data only accessible within active context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhK;hjubah}(h]h ]h"]h$]h&]uh1jhjhK;hj3hhubj)}(hX**Parameters** ``...`` variable arguments **Description** Declares that the data pointed to by the struct member pointer or global pointer is only accessible within the context entered by the given context lock. Read operations on the data require shared access, while write operations require exclusive access. .. code-block:: c struct some_state { spinlock_t lock; long *counter __pt_guarded_by(&lock); };h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhK?hjubj)}(hhh]j )}(h``...`` variable arguments h](j)}(h``...``h]j\)}(hj3h]h...}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1j[hj1ubah}(h]h ]h"]h$]h&]uh1jhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhj-ubj+)}(hhh]h)}(hvariable argumentsh]hvariable arguments}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHhKhjIubah}(h]h ]h"]h$]h&]uh1j*hj-ubeh}(h]h ]h"]h$]h&]uh1j hjHhKhj*ubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hjnh]h Description}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhjlubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhjubh)}(hDeclares that the data pointed to by the struct member pointer or global pointer is only accessible within the context entered by the given context lock. Read operations on the data require shared access, while write operations require exclusive access.h]hDeclares that the data pointed to by the struct member pointer or global pointer is only accessible within the context entered by the given context lock. Read operations on the data require shared access, while write operations require exclusive access.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKcounter); }h](h)}(h**Parameters**h]j)}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhj ubj)}(hhh]j )}(h``...`` variable arguments h](j)}(h``...``h]j\)}(hj% h]h...}(hj' hhhNhNubah}(h]h ]h"]h$]h&]uh1j[hj# ubah}(h]h ]h"]h$]h&]uh1jhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhj ubj+)}(hhh]h)}(hvariable argumentsh]hvariable arguments}(hj> hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj: hKhj; ubah}(h]h ]h"]h$]h&]uh1j*hj ubeh}(h]h ]h"]h$]h&]uh1j hj: hKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubh)}(h**Description**h]j)}(hj` h]h Description}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^ ubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhj ubh)}(hADisables context checking for contained statements or expression.h]hADisables context checking for contained statements or expression.}(hjv hhhNhNubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhj ubj)}(hstruct some_data { spinlock_t lock; int counter __guarded_by(&lock); }; int foo(struct some_data *d) { // ... // other code that is still checked ... // ... return context_unsafe(d->counter); }h]hstruct some_data { spinlock_t lock; int counter __guarded_by(&lock); }; int foo(struct some_data *d) { // ... // other code that is still checked ... // ... return context_unsafe(d->counter); }}hj sbah}(h]h ]h"]h$]h&]hhjjjj}uh1jhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj3hhhNhNubjE)}(hhh]h}(h]h ]h"]h$]h&]entries](jQ__context_unsafe (C macro)c.__context_unsafehNtauh1jDhj3hhhNhNubjV)}(hhh](j[)}(h__context_unsafeh]ja)}(h__context_unsafeh]jg)}(h__context_unsafeh]jm)}(hj h]h__context_unsafe}(hj hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jlhj ubah}(h]h ](jjeh"]h$]h&]hhuh1jfhj hhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKubah}(h]h ]h"]h$]h&]hhjuh1j`jjhj hhhj hKubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1jZhj hKhj hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj hhhj hKubeh}(h]h ](jmacroeh"]h$]h&]jjjj jj jjjuh1jUhhhj3hNhNubh)}(h``__context_unsafe (comment)``h]j\)}(hj h]h__context_unsafe (comment)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j[hj ubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhj3hhubj)}(h-function attribute, disable context checking h]h)}(h,function attribute, disable context checkingh]h,function attribute, disable context checking}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhj ubah}(h]h ]h"]h$]h&]uh1jhj hKhj3hhubj)}(h**Parameters** ``comment`` comment explaining why opt-out is safe **Description** Function attribute denoting that context analysis is disabled for the whole function. Forces adding an inline comment as argument.h](h)}(h**Parameters**h]j)}(hj h]h Parameters}(hj" hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhj ubj)}(hhh]j )}(h3``comment`` comment explaining why opt-out is safe h](j)}(h ``comment``h]j\)}(hj? h]hcomment}(hjA hhhNhNubah}(h]h ]h"]h$]h&]uh1j[hj= ubah}(h]h ]h"]h$]h&]uh1jhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhj9 ubj+)}(hhh]h)}(h&comment explaining why opt-out is safeh]h&comment explaining why opt-out is safe}(hjX hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjT hKhjU ubah}(h]h ]h"]h$]h&]uh1j*hj9 ubeh}(h]h ]h"]h$]h&]uh1j hjT hKhj6 ubah}(h]h ]h"]h$]h&]uh1jhj ubh)}(h**Description**h]j)}(hjz h]h Description}(hj| hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjx ubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhj ubh)}(hFunction attribute denoting that context analysis is disabled for the whole function. Forces adding an inline comment as argument.h]hFunction attribute denoting that context analysis is disabled for the whole function. Forces adding an inline comment as argument.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj3hhhNhNubjE)}(hhh]h}(h]h ]h"]h$]h&]entries](jQtoken_context_lock (C macro)c.token_context_lockhNtauh1jDhj3hhhNhNubjV)}(hhh](j[)}(htoken_context_lockh]ja)}(htoken_context_lockh]jg)}(htoken_context_lockh]jm)}(hj h]htoken_context_lock}(hj hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jlhj ubah}(h]h ](jjeh"]h$]h&]hhuh1jfhj hhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKubah}(h]h ]h"]h$]h&]hhjuh1j`jjhj hhhj hKubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1jZhj hKhj hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj hhhj hKubeh}(h]h ](jmacroeh"]h$]h&]jjjj jj jjjuh1jUhhhj3hNhNubh)}(h"``token_context_lock (name, ...)``h]j\)}(hj h]htoken_context_lock (name, ...)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j[hj ubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhj3hhubj)}(h1declare an abstract global context lock instance h]h)}(h0declare an abstract global context lock instanceh]h0declare an abstract global context lock instance}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhj ubah}(h]h ]h"]h$]h&]uh1jhj hKhj3hhubj)}(hX%**Parameters** ``name`` token context lock name ``...`` variable arguments **Description** Helper that declares an abstract global context lock instance **name**, but not backed by a real data structure (linker error if accidentally referenced). The type name is `__ctx_lock_**name**`.h](h)}(h**Parameters**h]j)}(hj* h]h Parameters}(hj, hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj( ubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhj$ ubj)}(hhh](j )}(h!``name`` token context lock name h](j)}(h``name``h]j\)}(hjI h]hname}(hjK hhhNhNubah}(h]h ]h"]h$]h&]uh1j[hjG ubah}(h]h ]h"]h$]h&]uh1jhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhjC ubj+)}(hhh]h)}(htoken context lock nameh]htoken context lock name}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^ hKhj_ ubah}(h]h ]h"]h$]h&]uh1j*hjC ubeh}(h]h ]h"]h$]h&]uh1j hj^ hKhj@ ubj )}(h``...`` variable arguments h](j)}(h``...``h]j\)}(hj h]h...}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j[hj ubah}(h]h ]h"]h$]h&]uh1jhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhj| ubj+)}(hhh]h)}(hvariable argumentsh]hvariable arguments}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1j*hj| ubeh}(h]h ]h"]h$]h&]uh1j hj hKhj@ ubeh}(h]h ]h"]h$]h&]uh1jhj$ ubh)}(h**Description**h]j)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhj$ ubh)}(hHelper that declares an abstract global context lock instance **name**, but not backed by a real data structure (linker error if accidentally referenced). The type name is `__ctx_lock_**name**`.h](h>Helper that declares an abstract global context lock instance }(hj hhhNhNubj)}(h**name**h]hname}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhf, but not backed by a real data structure (linker error if accidentally referenced). The type name is }(hj hhhNhNubjR)}(h`__ctx_lock_**name**`h]h__ctx_lock_**name**}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jQhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhj$ ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj3hhhNhNubjE)}(hhh]h}(h]h ]h"]h$]h&]entries](jQ%token_context_lock_instance (C macro)c.token_context_lock_instancehNtauh1jDhj3hhhNhNubjV)}(hhh](j[)}(htoken_context_lock_instanceh]ja)}(htoken_context_lock_instanceh]jg)}(htoken_context_lock_instanceh]jm)}(hj h]htoken_context_lock_instance}(hj* hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jlhj& ubah}(h]h ](jjeh"]h$]h&]hhuh1jfhj" hhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKubah}(h]h ]h"]h$]h&]hhjuh1j`jjhj hhhj= hKubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1jZhj= hKhj hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj hhhj= hKubeh}(h]h ](jmacroeh"]h$]h&]jjjjV jjV jjjuh1jUhhhj3hNhNubh)}(h+``token_context_lock_instance (ctx, name)``h]j\)}(hj\ h]h'token_context_lock_instance (ctx, name)}(hj^ hhhNhNubah}(h]h ]h"]h$]h&]uh1j[hjZ ubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhj3hhubj)}(h2declare another instance of a global context lock h]h)}(h1declare another instance of a global context lockh]h1declare another instance of a global context lock}(hjv hhhNhNubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhjr ubah}(h]h ]h"]h$]h&]uh1jhj hKhj3hhubj)}(hX**Parameters** ``ctx`` token context lock previously declared with token_context_lock() ``name`` name of additional global context lock instance **Description** Helper that declares an additional instance **name** of the same token context lock class **ctx**. This is helpful where multiple related token contexts are declared, to allow using the same underlying type (`__ctx_lock_**ctx**`) as function arguments.h](h)}(h**Parameters**h]j)}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhj ubj)}(hhh](j )}(hI``ctx`` token context lock previously declared with token_context_lock() h](j)}(h``ctx``h]j\)}(hj h]hctx}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j[hj ubah}(h]h ]h"]h$]h&]uh1jhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhj ubj+)}(hhh]h)}(h@token context lock previously declared with token_context_lock()h]h@token context lock previously declared with token_context_lock()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1j*hj ubeh}(h]h ]h"]h$]h&]uh1j hj hKhj ubj )}(h9``name`` name of additional global context lock instance h](j)}(h``name``h]j\)}(hj h]hname}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j[hj ubah}(h]h ]h"]h$]h&]uh1jhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhj ubj+)}(hhh]h)}(h/name of additional global context lock instanceh]h/name of additional global context lock instance}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1j*hj ubeh}(h]h ]h"]h$]h&]uh1j hj hKhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubh)}(h**Description**h]j)}(hj$h]h Description}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhj ubh)}(hHelper that declares an additional instance **name** of the same token context lock class **ctx**. This is helpful where multiple related token contexts are declared, to allow using the same underlying type (`__ctx_lock_**ctx**`) as function arguments.h](h,Helper that declares an additional instance }(hj:hhhNhNubj)}(h**name**h]hname}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubh& of the same token context lock class }(hj:hhhNhNubj)}(h**ctx**h]hctx}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubho. This is helpful where multiple related token contexts are declared, to allow using the same underlying type (}(hj:hhhNhNubjR)}(h`__ctx_lock_**ctx**`h]h__ctx_lock_**ctx**}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jQhj:ubh) as function arguments.}(hj:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj3hhhNhNubjE)}(hhh]h}(h]h ]h"]h$]h&]entries](jQ__must_hold (C macro) c.__must_holdhNtauh1jDhj3hhhNhNubjV)}(hhh](j[)}(h __must_holdh]ja)}(h __must_holdh]jg)}(h __must_holdh]jm)}(hjh]h __must_hold}(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jlhjubah}(h]h ](jjeh"]h$]h&]hhuh1jfhjhhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMubah}(h]h ]h"]h$]h&]hhjuh1j`jjhjhhhjhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jZhjhMhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](jmacroeh"]h$]h&]jjjjjjjjjuh1jUhhhj3hNhNubh)}(h``__must_hold (...)``h]j\)}(hjh]h__must_hold (...)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j[hjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhM hj3hhubj)}(hhKhj?ubah}(h]h ]h"]h$]h&]uh1j*hj#ubeh}(h]h ]h"]h$]h&]uh1j hj>hKhj ubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hjdh]h Description}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjbubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhjubh)}(hfFunction attribute declaring that the caller must hold the given context lock instance(s) exclusively.h]hfFunction attribute declaring that the caller must hold the given context lock instance(s) exclusively.}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhM hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj3hhhNhNubjE)}(hhh]h}(h]h ]h"]h$]h&]entries](jQ__must_not_hold (C macro)c.__must_not_holdhNtauh1jDhj3hhhNhNubjV)}(hhh](j[)}(h__must_not_holdh]ja)}(h__must_not_holdh]jg)}(h__must_not_holdh]jm)}(hjh]h__must_not_hold}(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jlhjubah}(h]h ](jjeh"]h$]h&]hhuh1jfhjhhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMubah}(h]h ]h"]h$]h&]hhjuh1j`jjhjhhhjhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jZhjhMhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](jmacroeh"]h$]h&]jjjjjjjjjuh1jUhhhj3hNhNubh)}(h``__must_not_hold (...)``h]j\)}(hjh]h__must_not_hold (...)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j[hjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMhj3hhubj)}(h6function attribute, caller must not hold context lock h]h)}(h5function attribute, caller must not hold context lockh]h5function attribute, caller must not hold context lock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMhjubah}(h]h ]h"]h$]h&]uh1jhjhMhj3hhubj)}(h**Parameters** ``...`` variable arguments **Description** Function attribute declaring that the caller must not hold the given context lock instance(s).h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMhjubj)}(hhh]j )}(h``...`` variable arguments h](j)}(h``...``h]j\)}(hj3h]h...}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1j[hj1ubah}(h]h ]h"]h$]h&]uh1jhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhj-ubj+)}(hhh]h)}(hvariable argumentsh]hvariable arguments}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHhKhjIubah}(h]h ]h"]h$]h&]uh1j*hj-ubeh}(h]h ]h"]h$]h&]uh1j hjHhKhj*ubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hjnh]h Description}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhjlubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhjubh)}(h^Function attribute declaring that the caller must not hold the given context lock instance(s).h]h^Function attribute declaring that the caller must not hold the given context lock instance(s).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj3hhhNhNubjE)}(hhh]h}(h]h ]h"]h$]h&]entries](jQ__acquires (C macro) c.__acquireshNtauh1jDhj3hhhNhNubjV)}(hhh](j[)}(h __acquiresh]ja)}(h __acquiresh]jg)}(h __acquiresh]jm)}(hjh]h __acquires}(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jlhjubah}(h]h ](jjeh"]h$]h&]hhuh1jfhjhhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMubah}(h]h ]h"]h$]h&]hhjuh1j`jjhjhhhjhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jZhjhMhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](jmacroeh"]h$]h&]jjjjjjjjjuh1jUhhhj3hNhNubh)}(h``__acquires (...)``h]j\)}(hjh]h__acquires (...)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j[hjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMhj3hhubj)}(h?function attribute, function acquires context lock exclusively h]h)}(h>function attribute, function acquires context lock exclusivelyh]h>function attribute, function acquires context lock exclusively}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMhjubah}(h]h ]h"]h$]h&]uh1jhjhMhj3hhubj)}(h**Parameters** ``...`` variable arguments **Description** Function attribute declaring that the function acquires the given context lock instance(s) exclusively, but does not release them.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMhjubj)}(hhh]j )}(h``...`` variable arguments h](j)}(h``...``h]j\)}(hj=h]h...}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j[hj;ubah}(h]h ]h"]h$]h&]uh1jhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhj7ubj+)}(hhh]h)}(hvariable argumentsh]hvariable arguments}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRhKhjSubah}(h]h ]h"]h$]h&]uh1j*hj7ubeh}(h]h ]h"]h$]h&]uh1j hjRhKhj4ubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hjxh]h Description}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjvubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhjubh)}(hFunction attribute declaring that the function acquires the given context lock instance(s) exclusively, but does not release them.h]hFunction attribute declaring that the function acquires the given context lock instance(s) exclusively, but does not release them.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj3hhhNhNubjE)}(hhh]h}(h]h ]h"]h$]h&]entries](jQ__cond_acquires (C macro)c.__cond_acquireshNtauh1jDhj3hhhNhNubjV)}(hhh](j[)}(h__cond_acquiresh]ja)}(h__cond_acquiresh]jg)}(h__cond_acquiresh]jm)}(hjh]h__cond_acquires}(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jlhjubah}(h]h ](jjeh"]h$]h&]hhuh1jfhjhhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhM-ubah}(h]h ]h"]h$]h&]hhjuh1j`jjhjhhhjhM-ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jZhjhM-hjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhjhM-ubeh}(h]h ](jmacroeh"]h$]h&]jjjjjjjjjuh1jUhhhj3hNhNubh)}(h``__cond_acquires (ret, x)``h]j\)}(hjh]h__cond_acquires (ret, x)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j[hjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhM/hj3hhubj)}(hOfunction attribute, function conditionally acquires a context lock exclusively h]h)}(hNfunction attribute, function conditionally acquires a context lock exclusivelyh]hNfunction attribute, function conditionally acquires a context lock exclusively}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhM-hj ubah}(h]h ]h"]h$]h&]uh1jhjhM-hj3hhubj)}(hX**Parameters** ``ret`` abstract value returned by function if context lock acquired ``x`` context lock instance pointer **Description** Function attribute declaring that the function conditionally acquires the given context lock instance **x** exclusively, but does not release it. The function return value **ret** denotes when the context lock is acquired. **ret** may be one of: true, false, nonzero, 0, nonnull, NULL.h](h)}(h**Parameters**h]j)}(hj(h]h Parameters}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhM1hj"ubj)}(hhh](j )}(hE``ret`` abstract value returned by function if context lock acquired h](j)}(h``ret``h]j\)}(hjGh]hret}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1j[hjEubah}(h]h ]h"]h$]h&]uh1jhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhM/hjAubj+)}(hhh]h)}(hubj )}(h$``x`` context lock instance pointer h](j)}(h``x``h]j\)}(hjh]hx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j[hj~ubah}(h]h ]h"]h$]h&]uh1jhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhM0hjzubj+)}(hhh]h)}(hcontext lock instance pointerh]hcontext lock instance pointer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM0hjubah}(h]h ]h"]h$]h&]uh1j*hjzubeh}(h]h ]h"]h$]h&]uh1j hjhM0hj>ubeh}(h]h ]h"]h$]h&]uh1jhj"ubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhM2hj"ubh)}(hFunction attribute declaring that the function conditionally acquires the given context lock instance **x** exclusively, but does not release it. The function return value **ret** denotes when the context lock is acquired.h](hfFunction attribute declaring that the function conditionally acquires the given context lock instance }(hjhhhNhNubj)}(h**x**h]hx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhA exclusively, but does not release it. The function return value }(hjhhhNhNubj)}(h**ret**h]hret}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh+ denotes when the context lock is acquired.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhM1hj"ubh)}(h>**ret** may be one of: true, false, nonzero, 0, nonnull, NULL.h](j)}(h**ret**h]hret}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh7 may be one of: true, false, nonzero, 0, nonnull, NULL.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhM5hj"ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj3hhhNhNubjE)}(hhh]h}(h]h ]h"]h$]h&]entries](jQ__releases (C macro) c.__releaseshNtauh1jDhj3hhhNhNubjV)}(hhh](j[)}(h __releasesh]ja)}(h __releasesh]jg)}(h __releasesh]jm)}(hj;h]h __releases}(hjEhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jlhjAubah}(h]h ](jjeh"]h$]h&]hhuh1jfhj=hhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhM;ubah}(h]h ]h"]h$]h&]hhjuh1j`jjhj9hhhjXhM;ubah}(h]j4ah ](jjeh"]h$]h&]jj)jhuh1jZhjXhM;hj6hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj6hhhjXhM;ubeh}(h]h ](jmacroeh"]h$]h&]jjjjqjjqjjjuh1jUhhhj3hNhNubh)}(h``__releases (...)``h]j\)}(hjwh]h__releases (...)}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1j[hjuubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhM=hj3hhubj)}(hAfunction attribute, function releases a context lock exclusively h]h)}(h@function attribute, function releases a context lock exclusivelyh]h@function attribute, function releases a context lock exclusively}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhM;hjubah}(h]h ]h"]h$]h&]uh1jhjhM;hj3hhubj)}(h**Parameters** ``...`` variable arguments **Description** Function attribute declaring that the function releases the given context lock instance(s) exclusively. The associated context(s) must be active on entry.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhM?hjubj)}(hhh]j )}(h``...`` variable arguments h](j)}(h``...``h]j\)}(hjh]h...}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j[hjubah}(h]h ]h"]h$]h&]uh1jhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhjubj+)}(hhh]h)}(hvariable argumentsh]hvariable arguments}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j*hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhjubh)}(hFunction attribute declaring that the function releases the given context lock instance(s) exclusively. The associated context(s) must be active on entry.h]hFunction attribute declaring that the function releases the given context lock instance(s) exclusively. The associated context(s) must be active on entry.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhM<hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj3hhhNhNubjE)}(hhh]h}(h]h ]h"]h$]h&]entries](jQ__acquire (C macro) c.__acquirehNtauh1jDhj3hhhNhNubjV)}(hhh](j[)}(h __acquireh]ja)}(h __acquireh]jg)}(h __acquireh]jm)}(hjEh]h __acquire}(hjOhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jlhjKubah}(h]h ](jjeh"]h$]h&]hhuh1jfhjGhhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMdubah}(h]h ]h"]h$]h&]hhjuh1j`jjhjChhhjbhMdubah}(h]j>ah ](jjeh"]h$]h&]jj)jhuh1jZhjbhMdhj@hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj@hhhjbhMdubeh}(h]h ](jmacroeh"]h$]h&]jjjj{jj{jjjuh1jUhhhj3hNhNubh)}(h``__acquire (x)``h]j\)}(hjh]h __acquire (x)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j[hjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMfhj3hhubj)}(h-function to acquire context lock exclusively h]h)}(h,function to acquire context lock exclusivelyh]h,function to acquire context lock exclusively}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMdhjubah}(h]h ]h"]h$]h&]uh1jhjhMdhj3hhubj)}(h**Parameters** ``x`` context lock instance pointer **Description** No-op function that acquires the given context lock instance **x** exclusively.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMhhjubj)}(hhh]j )}(h$``x`` context lock instance pointer h](j)}(h``x``h]j\)}(hjh]hx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j[hjubah}(h]h ]h"]h$]h&]uh1jhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMehjubj+)}(hhh]h)}(hcontext lock instance pointerh]hcontext lock instance pointer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMehjubah}(h]h ]h"]h$]h&]uh1j*hjubeh}(h]h ]h"]h$]h&]uh1j hjhMehjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMghjubh)}(hONo-op function that acquires the given context lock instance **x** exclusively.h](h=No-op function that acquires the given context lock instance }(hj&hhhNhNubj)}(h**x**h]hx}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh exclusively.}(hj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMfhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj3hhhNhNubjE)}(hhh]h}(h]h ]h"]h$]h&]entries](jQ__release (C macro) c.__releasehNtauh1jDhj3hhhNhNubjV)}(hhh](j[)}(h __releaseh]ja)}(h __releaseh]jg)}(h __releaseh]jm)}(hjah]h __release}(hjkhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jlhjgubah}(h]h ](jjeh"]h$]h&]hhuh1jfhjchhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMlubah}(h]h ]h"]h$]h&]hhjuh1j`jjhj_hhhj~hMlubah}(h]jZah ](jjeh"]h$]h&]jj)jhuh1jZhj~hMlhj\hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj\hhhj~hMlubeh}(h]h ](jmacroeh"]h$]h&]jjjjjjjjjuh1jUhhhj3hNhNubh)}(h``__release (x)``h]j\)}(hjh]h __release (x)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j[hjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMnhj3hhubj)}(h-function to release context lock exclusively h]h)}(h,function to release context lock exclusivelyh]h,function to release context lock exclusively}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMlhjubah}(h]h ]h"]h$]h&]uh1jhjhMlhj3hhubj)}(h**Parameters** ``x`` context lock instance pointer **Description** No-op function that releases the given context lock instance **x**.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMphjubj)}(hhh]j )}(h$``x`` context lock instance pointer h](j)}(h``x``h]j\)}(hjh]hx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j[hjubah}(h]h ]h"]h$]h&]uh1jhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMmhjubj+)}(hhh]h)}(hcontext lock instance pointerh]hcontext lock instance pointer}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMmhjubah}(h]h ]h"]h$]h&]uh1j*hjubeh}(h]h ]h"]h$]h&]uh1j hjhMmhjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hj,h]h Description}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMohjubh)}(hCNo-op function that releases the given context lock instance **x**.h](h=No-op function that releases the given context lock instance }(hjBhhhNhNubj)}(h**x**h]hx}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubh.}(hjBhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMnhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj3hhhNhNubjE)}(hhh]h}(h]h ]h"]h$]h&]entries](jQ__must_hold_shared (C macro)c.__must_hold_sharedhNtauh1jDhj3hhhNhNubjV)}(hhh](j[)}(h__must_hold_sharedh]ja)}(h__must_hold_sharedh]jg)}(h__must_hold_sharedh]jm)}(hj}h]h__must_hold_shared}(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jlhjubah}(h]h ](jjeh"]h$]h&]hhuh1jfhjhhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMtubah}(h]h ]h"]h$]h&]hhjuh1j`jjhj{hhhjhMtubah}(h]jvah ](jjeh"]h$]h&]jj)jhuh1jZhjhMthjxhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjxhhhjhMtubeh}(h]h ](jmacroeh"]h$]h&]jjjjjjjjjuh1jUhhhj3hNhNubh)}(h``__must_hold_shared (...)``h]j\)}(hjh]h__must_hold_shared (...)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j[hjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMvhj3hhubj)}(h9function attribute, caller must hold shared context lock h]h)}(h8function attribute, caller must hold shared context lockh]h8function attribute, caller must hold shared context lock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMthjubah}(h]h ]h"]h$]h&]uh1jhjhMthj3hhubj)}(h**Parameters** ``...`` variable arguments **Description** Function attribute declaring that the caller must hold the given context lock instance(s) with shared access.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMxhjubj)}(hhh]j )}(h``...`` variable arguments h](j)}(h``...``h]j\)}(hj h]h...}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j[hj ubah}(h]h ]h"]h$]h&]uh1jhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhjubj+)}(hhh]h)}(hvariable argumentsh]hvariable arguments}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hKhj#ubah}(h]h ]h"]h$]h&]uh1j*hjubeh}(h]h ]h"]h$]h&]uh1j hj"hKhjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hjHh]h Description}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhjubh)}(hmFunction attribute declaring that the caller must hold the given context lock instance(s) with shared access.h]hmFunction attribute declaring that the caller must hold the given context lock instance(s) with shared access.}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMuhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj3hhhNhNubjE)}(hhh]h}(h]h ]h"]h$]h&]entries](jQ__acquires_shared (C macro)c.__acquires_sharedhNtauh1jDhj3hhhNhNubjV)}(hhh](j[)}(h__acquires_sharedh]ja)}(h__acquires_sharedh]jg)}(h__acquires_sharedh]jm)}(hjh]h__acquires_shared}(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jlhjubah}(h]h ](jjeh"]h$]h&]hhuh1jfhjhhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhM|ubah}(h]h ]h"]h$]h&]hhjuh1j`jjhjhhhjhM|ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jZhjhM|hjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhjhM|ubeh}(h]h ](jmacroeh"]h$]h&]jjjjjjjjjuh1jUhhhj3hNhNubh)}(h``__acquires_shared (...)``h]j\)}(hjh]h__acquires_shared (...)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j[hjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhM~hj3hhubj)}(h:function attribute, function acquires context lock shared h]h)}(h9function attribute, function acquires context lock sharedh]h9function attribute, function acquires context lock shared}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhM|hjubah}(h]h ]h"]h$]h&]uh1jhjhM|hj3hhubj)}(h**Parameters** ``...`` variable arguments **Description** Function attribute declaring that the function acquires the given context lock instance(s) with shared access, but does not release them.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMhjubj)}(hhh]j )}(h``...`` variable arguments h](j)}(h``...``h]j\)}(hjh]h...}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j[hjubah}(h]h ]h"]h$]h&]uh1jhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhjubj+)}(hhh]h)}(hvariable argumentsh]hvariable arguments}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hKhj-ubah}(h]h ]h"]h$]h&]uh1j*hjubeh}(h]h ]h"]h$]h&]uh1j hj,hKhjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hjRh]h Description}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jhjPubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhjubh)}(hFunction attribute declaring that the function acquires the given context lock instance(s) with shared access, but does not release them.h]hFunction attribute declaring that the function acquires the given context lock instance(s) with shared access, but does not release them.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhM}hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj3hhhNhNubjE)}(hhh]h}(h]h ]h"]h$]h&]entries](jQ __cond_acquires_shared (C macro)c.__cond_acquires_sharedhNtauh1jDhj3hhhNhNubjV)}(hhh](j[)}(h__cond_acquires_sharedh]ja)}(h__cond_acquires_sharedh]jg)}(h__cond_acquires_sharedh]jm)}(hjh]h__cond_acquires_shared}(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jlhjubah}(h]h ](jjeh"]h$]h&]hhuh1jfhjhhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMubah}(h]h ]h"]h$]h&]hhjuh1j`jjhjhhhjhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jZhjhMhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](jmacroeh"]h$]h&]jjjjjjjjjuh1jUhhhj3hNhNubh)}(h#``__cond_acquires_shared (ret, x)``h]j\)}(hjh]h__cond_acquires_shared (ret, x)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j[hjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMhj3hhubj)}(hJfunction attribute, function conditionally acquires a context lock shared h]h)}(hIfunction attribute, function conditionally acquires a context lock sharedh]hIfunction attribute, function conditionally acquires a context lock shared}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMhjubah}(h]h ]h"]h$]h&]uh1jhjhMhj3hhubj)}(hX**Parameters** ``ret`` abstract value returned by function if context lock acquired ``x`` context lock instance pointer **Description** Function attribute declaring that the function conditionally acquires the given context lock instance **x** with shared access, but does not release it. The function return value **ret** denotes when the context lock is acquired. **ret** may be one of: true, false, nonzero, 0, nonnull, NULL.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMhjubj)}(hhh](j )}(hE``ret`` abstract value returned by function if context lock acquired h](j)}(h``ret``h]j\)}(hj!h]hret}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j[hjubah}(h]h ]h"]h$]h&]uh1jhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMhjubj+)}(hhh]h)}(h**ret** may be one of: true, false, nonzero, 0, nonnull, NULL.h](j)}(h**ret**h]hret}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh7 may be one of: true, false, nonzero, 0, nonnull, NULL.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj3hhhNhNubjE)}(hhh]h}(h]h ]h"]h$]h&]entries](jQ__releases_shared (C macro)c.__releases_sharedhNtauh1jDhj3hhhNhNubjV)}(hhh](j[)}(h__releases_sharedh]ja)}(h__releases_sharedh]jg)}(h__releases_sharedh]jm)}(hjh]h__releases_shared}(hjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jlhjubah}(h]h ](jjeh"]h$]h&]hhuh1jfhjhhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMubah}(h]h ]h"]h$]h&]hhjuh1j`jjhjhhhj2hMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jZhj2hMhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhj2hMubeh}(h]h ](jmacroeh"]h$]h&]jjjjKjjKjjjuh1jUhhhj3hNhNubh)}(h``__releases_shared (...)``h]j\)}(hjQh]h__releases_shared (...)}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1j[hjOubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMhj3hhubj)}(h`_, with some keywords and documentation still using the thread-safety-analysis-only terminology. This was later changed and the feature became more flexible, gaining the ability to define custom "capabilities". Its foundations can be found in `Capability Systems `_, used to specify the permissibility of operations to depend on some "capability" being held (or not held).h](h$Clang originally called the feature }(hjhhhNhNubj=)}(hQ`Thread Safety Analysis `_h]hThread Safety Analysis}(hjhhhNhNubah}(h]h ]h"]h$]h&]nameThread Safety AnalysisjN5https://clang.llvm.org/docs/ThreadSafetyAnalysis.htmluh1j<hjubh)}(h8 h]h}(h]thread-safety-analysisah ]h"]thread safety analysisah$]h&]refurijuh1hj]Khjubh, with some keywords and documentation still using the thread-safety-analysis-only terminology. This was later changed and the feature became more flexible, gaining the ability to define custom “capabilities”. Its foundations can be found in }(hjhhhNhNubj=)}(hO`Capability Systems `_h]hCapability Systems}(hjhhhNhNubah}(h]h ]h"]h$]h&]nameCapability SystemsjN7https://www.cs.cornell.edu/talc/papers/capabilities.pdfuh1j<hjubh)}(h: h]h}(h]capability-systemsah ]h"]capability systemsah$]h&]refurij uh1hj]Khjubho, used to specify the permissibility of operations to depend on some “capability” being held (or not held).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXBecause the feature is not just able to express capabilities related to synchronization primitives, and "capability" is already overloaded in the kernel, the naming chosen for the kernel departs from Clang's initial "Thread Safety" and "capability" nomenclature; we refer to the feature as "Context Analysis" to avoid confusion. The internal implementation still makes references to Clang's terminology in a few places, such as `-Wthread-safety` being the warning option that also still appears in diagnostic messages.h](hXBecause the feature is not just able to express capabilities related to synchronization primitives, and “capability” is already overloaded in the kernel, the naming chosen for the kernel departs from Clang’s initial “Thread Safety” and “capability” nomenclature; we refer to the feature as “Context Analysis” to avoid confusion. The internal implementation still makes references to Clang’s terminology in a few places, such as }(hj hhhNhNubjR)}(h`-Wthread-safety`h]h-Wthread-safety}(hj# hhhNhNubah}(h]h ]h"]h$]h&]uh1jQhj ubhI being the warning option that also still appears in diagnostic messages.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h] backgroundah ]h"] backgroundah$]h&]uh1hhhhhhhhKubeh}(h](compiler-based-context-analysisheh ]h"](compiler-based context analysiscontext-analysiseh$]h&]uh1hhhhhhhhKexpect_referenced_by_name}jI hsexpect_referenced_by_id}hhsubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjs error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehnj _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}h]hasnameids}(jI hjH jE jjjYjVj0j-jjj@ j= jjj j u nametypes}(jI jH jjYj0jj@ jj uh}(hhjE hjjjVjPj-jjj3jSj\jjjjj0j5jjj j j j j j j j jjjjjjjjj4j9j>jCjZj_jvj{jjjjjjjjj4j9jPjUjmjrj= jjjj j u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages]hsystem_message)}(hhh]h)}(hhh]h6Hyperlink target "context-analysis" is not referenced.}hj sbah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehnjlineKuh1j uba transformerN include_log] decorationNhhub.