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]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:}(hhhhhNhNubah}(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.}(hjhhhNhNubah}(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 }(hj!hhhNhNubhemphasis)}(h*opt-in by default*h]hopt-in by default}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj!ubh[, and requires declaring which modules and subsystems should be analyzed in the respective }(hj!hhhNhNubhtitle_reference)}(h `Makefile`h]hMakefile}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj!ubh:}(hj!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubj)}(h CONTEXT_ANALYSIS_mymodule.o := yh]h CONTEXT_ANALYSIS_mymodule.o := y}hjWsbah}(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:}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubj)}(hCONTEXT_ANALYSIS := yh]hCONTEXT_ANALYSIS := y}hjssbah}(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.}(hjhhhNhNubah}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK=hjhhubh)}(haMore details are also documented `here `_.h](h!More details are also documented }(hj hhhNhNubh reference)}(h?`here `_h]hhere}(hj*hhhNhNubah}(h]h ]h"]h$]h&]namehererefuri5https://clang.llvm.org/docs/ThreadSafetyAnalysis.htmluh1j(hj ubh)}(h8 h]h}(h]hereah ]h"]hereah$]h&]refurij;uh1hŒ referencedKhj ubh.}(hj hhhNhNubeh}(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.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKIhjTubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubh)}(hhh](h)}(hSupported Kernel Primitivesh]hSupported Kernel Primitives}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlhhhhhKOubh)}(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: }(hj}hhhNhNubj>)}(h`raw_spinlock_t`h]hraw_spinlock_t}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj}ubh, }(hj}hhhNhNubj>)}(h `spinlock_t`h]h spinlock_t}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj}ubh, }hj}sbj>)}(h `rwlock_t`h]hrwlock_t}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj}ubh, }hj}sbj>)}(h`mutex`h]hmutex}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj}ubh, }hj}sbj>)}(h `seqlock_t`h]h seqlock_t}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj}ubh, }(hj}hhhNhNubj>)}(h`bit_spinlock`h]h bit_spinlock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj}ubh , RCU, SRCU (}(hj}hhhNhNubj>)}(h `srcu_struct`h]h srcu_struct}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj}ubh), }(hj}hhhNhNubj>)}(h`rw_semaphore`h]h rw_semaphore}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj}ubh, }hj}sbj>)}(h`local_lock_t`h]h local_lock_t}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj}ubh, }hj}sbj>)}(h `ww_mutex`h]hww_mutex}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj}ubh.}(hj}hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKQhjlhhubh)}(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 (}(hj?hhhNhNubhliteral)}(h``type_init(&lock)``h]htype_init(&lock)}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jGhj?ubh), prefer using }(hj?hhhNhNubjH)}(h``guard(type_init)(&lock)``h]hguard(type_init)(&lock)}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jGhj?ubh or }(hj?hhhNhNubjH)}(h*``scoped_guard(type_init, &lock) { ... }``h]h&scoped_guard(type_init, &lock) { ... }}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jGhj?ubh 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).}(hj?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKVhjlhhubh)}(h For example::h]h For example:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK]hjlhhubj)}(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_hjlhhubh)}(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 }(hjhhhNhNubjH)}(h``context_unsafe(var = init)``h]hcontext_unsafe(var = init)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jGhjubhC expression, or by marking small initialization functions with the }(hjhhhNhNubjH)}(h``__context_unsafe(init)``h]h__context_unsafe(init)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jGhjubh attribute.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKlhjlhhubh)}(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 }(hjhhhNhNubj>)}(h`lockdep_assert_held()`h]hlockdep_assert_held()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjubhX., 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 }(hjhhhNhNubj>)}(h`__must_hold()`h]h __must_hold()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjubh inappropriate.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKrhjlhhubeh}(h]supported-kernel-primitivesah ]h"]supported kernel primitivesah$]h&]uh1hhjhhhhhKOubh)}(hhh](h)}(hKeywordsh]hKeywords}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKzubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](single__guarded_by (C macro)c.__guarded_byhNtauh1j0hjhhhNhNubhdesc)}(hhh](hdesc_signature)}(h __guarded_byh]hdesc_signature_line)}(h __guarded_byh]h desc_name)}(h __guarded_byh]h desc_sig_name)}(hjJh]h __guarded_by}(hjZhhhNhNubah}(h]h ]nah"]h$]h&]uh1jXhjTubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jRhjNhhhu/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_permalinkuh1jLsphinx_line_type declaratorhjHhhhjphK*ubah}(h]j?ah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jFhjphK*hjChhubh desc_content)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjChhhjphK*ubeh}(h]h ](cmacroeh"]h$]h&]domainjobjtypejdesctypejnoindex noindexentrynocontentsentryuh1jAhhhjhNhNubh)}(h``__guarded_by (...)``h]jH)}(hjh]h__guarded_by (...)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jGhjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhK,hjhhubh 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*hjhhubh 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]jH)}(hjh]h...}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jGhjubah}(h]h ]h"]h$]h&]uh1jhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhjubh definition)}(hhh]h)}(hvariable argumentsh]hvariable arguments}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubah}(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.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.}(hjShhhNhNubah}(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); };}hjbsbah}(h]h ]h"]h$]h&]hhforcelanguagejhighlight_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&]uh1jhjhhhNhNubj1)}(hhh]h}(h]h ]h"]h$]h&]entries](j=__pt_guarded_by (C macro)c.__pt_guarded_byhNtauh1j0hjhhhNhNubjB)}(hhh](jG)}(h__pt_guarded_byh]jM)}(h__pt_guarded_byh]jS)}(h__pt_guarded_byh]jY)}(hjh]h__pt_guarded_by}(hjhhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjubah}(h]h ](jkjleh"]h$]h&]hhuh1jRhjhhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhK;ubah}(h]h ]h"]h$]h&]hhjwuh1jLjxjyhjhhhjhK;ubah}(h]jah ](j}j~eh"]h$]h&]jj)jhuh1jFhjhK;hjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhjhK;ubeh}(h]h ](jmacroeh"]h$]h&]jjjjjjjjjuh1jAhhhjhNhNubh)}(h``__pt_guarded_by (...)``h]jH)}(hjh]h__pt_guarded_by (...)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jGhjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhK=hjhhubj)}(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;hjhhubj)}(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]jH)}(hjh]h...}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jGhjubah}(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}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4hKhj5ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj4hKhjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hjZh]h Description}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjXubah}(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.}(hjphhhNhNubah}(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]jH)}(hj h]h...}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jGhj 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&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj& hKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubh)}(h**Description**h]j)}(hjL h]h Description}(hjN hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJ 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.}(hjb 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); }}hjq sbah}(h]h ]h"]h$]h&]hhjpjqjjr}uh1jhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj1)}(hhh]h}(h]h ]h"]h$]h&]entries](j=__context_unsafe (C macro)c.__context_unsafehNtauh1j0hjhhhNhNubjB)}(hhh](jG)}(h__context_unsafeh]jM)}(h__context_unsafeh]jS)}(h__context_unsafeh]jY)}(hj h]h__context_unsafe}(hj hhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhj ubah}(h]h ](jkjleh"]h$]h&]hhuh1jRhj hhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKubah}(h]h ]h"]h$]h&]hhjwuh1jLjxjyhj hhhj hKubah}(h]j ah ](j}j~eh"]h$]h&]jj)jhuh1jFhj hKhj hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj hhhj hKubeh}(h]h ](jmacroeh"]h$]h&]jjjj jj jjjuh1jAhhhjhNhNubh)}(h``__context_unsafe (comment)``h]jH)}(hj h]h__context_unsafe (comment)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jGhj ubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhjhhubj)}(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 hKhjhhubj)}(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]jH)}(hj+ h]hcomment}(hj- hhhNhNubah}(h]h ]h"]h$]h&]uh1jGhj) 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&comment explaining why opt-out is safeh]h&comment explaining why opt-out is safe}(hjD hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@ hKhjA ubah}(h]h ]h"]h$]h&]uh1jhj% ubeh}(h]h ]h"]h$]h&]uh1jhj@ hKhj" ubah}(h]h ]h"]h$]h&]uh1jhj ubh)}(h**Description**h]j)}(hjf h]h Description}(hjh hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjd 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&]uh1jhjhhhNhNubj1)}(hhh]h}(h]h ]h"]h$]h&]entries](j=token_context_lock (C macro)c.token_context_lockhNtauh1j0hjhhhNhNubjB)}(hhh](jG)}(htoken_context_lockh]jM)}(htoken_context_lockh]jS)}(htoken_context_lockh]jY)}(hj h]htoken_context_lock}(hj hhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhj ubah}(h]h ](jkjleh"]h$]h&]hhuh1jRhj hhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKubah}(h]h ]h"]h$]h&]hhjwuh1jLjxjyhj hhhj hKubah}(h]j ah ](j}j~eh"]h$]h&]jj)jhuh1jFhj hKhj hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj hhhj hKubeh}(h]h ](jmacroeh"]h$]h&]jjjj jj jjjuh1jAhhhjhNhNubh)}(h"``token_context_lock (name, ...)``h]jH)}(hj h]htoken_context_lock (name, ...)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jGhj ubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhjhhubj)}(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 hKhjhhubj)}(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]jH)}(hj5 h]hname}(hj7 hhhNhNubah}(h]h ]h"]h$]h&]uh1jGhj3 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)}(htoken context lock nameh]htoken context lock name}(hjN hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJ hKhjK ubah}(h]h ]h"]h$]h&]uh1jhj/ ubeh}(h]h ]h"]h$]h&]uh1jhjJ hKhj, ubj)}(h``...`` variable arguments h](j)}(h``...``h]jH)}(hjn h]h...}(hjp hhhNhNubah}(h]h ]h"]h$]h&]uh1jGhjl ubah}(h]h ]h"]h$]h&]uh1jhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhjh ubj)}(hhh]h)}(hvariable argumentsh]hvariable arguments}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1jhjh ubeh}(h]h ]h"]h$]h&]uh1jhj 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 hhhNhNubj>)}(h`__ctx_lock_**name**`h]h__ctx_lock_**name**}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj 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&]uh1jhjhhhNhNubj1)}(hhh]h}(h]h ]h"]h$]h&]entries](j=%token_context_lock_instance (C macro)c.token_context_lock_instancehNtauh1j0hjhhhNhNubjB)}(hhh](jG)}(htoken_context_lock_instanceh]jM)}(htoken_context_lock_instanceh]jS)}(htoken_context_lock_instanceh]jY)}(hj h]htoken_context_lock_instance}(hj hhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhj ubah}(h]h ](jkjleh"]h$]h&]hhuh1jRhj hhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKubah}(h]h ]h"]h$]h&]hhjwuh1jLjxjyhj hhhj) hKubah}(h]j ah ](j}j~eh"]h$]h&]jj)jhuh1jFhj) hKhj hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj hhhj) hKubeh}(h]h ](jmacroeh"]h$]h&]jjjjB jjB jjjuh1jAhhhjhNhNubh)}(h+``token_context_lock_instance (ctx, name)``h]jH)}(hjH h]h'token_context_lock_instance (ctx, name)}(hjJ hhhNhNubah}(h]h ]h"]h$]h&]uh1jGhjF ubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhKhjhhubj)}(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}(hjb 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&]uh1jhjp hKhjhhubj)}(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.hhKhjw ubj)}(hhh](j)}(hI``ctx`` token context lock previously declared with token_context_lock() h](j)}(h``ctx``h]jH)}(hj h]hctx}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jGhj 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&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKhj ubj)}(h9``name`` name of additional global context lock instance h](j)}(h``name``h]jH)}(hj h]hname}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jGhj 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}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKhj ubeh}(h]h ]h"]h$]h&]uh1jhjw 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.hhKhjw 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}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubh& of the same token context lock class }(hj&hhhNhNubj)}(h**ctx**h]hctx}(hj@hhhNhNubah}(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&hhhNhNubj>)}(h`__ctx_lock_**ctx**`h]h__ctx_lock_**ctx**}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj&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.hhKhjw ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj1)}(hhh]h}(h]h ]h"]h$]h&]entries](j=__must_hold (C macro) c.__must_holdhNtauh1j0hjhhhNhNubjB)}(hhh](jG)}(h __must_holdh]jM)}(h __must_holdh]jS)}(h __must_holdh]jY)}(hjh]h __must_hold}(hjhhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjubah}(h]h ](jkjleh"]h$]h&]hhuh1jRhjhhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMubah}(h]h ]h"]h$]h&]hhjwuh1jLjxjyhjhhhjhMubah}(h]j~ah ](j}j~eh"]h$]h&]jj)jhuh1jFhjhMhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](jmacroeh"]h$]h&]jjjjjjjjjuh1jAhhhjhNhNubh)}(h``__must_hold (...)``h]jH)}(hjh]h__must_hold (...)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jGhjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhM hjhhubj)}(hfunction 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&]uh1jhjhMhjhhubj)}(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)}(hj h]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]jH)}(hj)h]h...}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jGhj'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}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hKhj?ubah}(h]h ]h"]h$]h&]uh1jhj#ubeh}(h]h ]h"]h$]h&]uh1jhj>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)}(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.}(hjzhhhNhNubah}(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&]uh1jhjhhhNhNubj1)}(hhh]h}(h]h ]h"]h$]h&]entries](j=__cond_acquires (C macro)c.__cond_acquireshNtauh1j0hjhhhNhNubjB)}(hhh](jG)}(h__cond_acquiresh]jM)}(h__cond_acquiresh]jS)}(h__cond_acquiresh]jY)}(hjh]h__cond_acquires}(hjhhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjubah}(h]h ](jkjleh"]h$]h&]hhuh1jRhjhhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhM-ubah}(h]h ]h"]h$]h&]hhjwuh1jLjxjyhjhhhjhM-ubah}(h]jah ](j}j~eh"]h$]h&]jj)jhuh1jFhjhM-hjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhjhM-ubeh}(h]h ](jmacroeh"]h$]h&]jjjjjjjjjuh1jAhhhjhNhNubh)}(h``__cond_acquires (ret, x)``h]jH)}(hjh]h__cond_acquires (ret, x)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jGhjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhM/hjhhubj)}(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}(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-hjhhubj)}(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)}(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.hhM1hjubj)}(hhh](j)}(hE``ret`` abstract value returned by function if context lock acquired h](j)}(h``ret``h]jH)}(hj3h]hret}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jGhj1ubah}(h]h ]h"]h$]h&]uh1jhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhM/hj-ubj)}(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.hhM5hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj1)}(hhh]h}(h]h ]h"]h$]h&]entries](j=__releases (C macro) c.__releaseshNtauh1j0hjhhhNhNubjB)}(hhh](jG)}(h __releasesh]jM)}(h __releasesh]jS)}(h __releasesh]jY)}(hj'h]h __releases}(hj1hhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhj-ubah}(h]h ](jkjleh"]h$]h&]hhuh1jRhj)hhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhM;ubah}(h]h ]h"]h$]h&]hhjwuh1jLjxjyhj%hhhjDhM;ubah}(h]j ah ](j}j~eh"]h$]h&]jj)jhuh1jFhjDhM;hj"hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj"hhhjDhM;ubeh}(h]h ](jmacroeh"]h$]h&]jjjj]jj]jjjuh1jAhhhjhNhNubh)}(h``__releases (...)``h]jH)}(hjch]h__releases (...)}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jGhjaubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhM=hjhhubj)}(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}(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;hjyubah}(h]h ]h"]h$]h&]uh1jhjhM;hjhhubj)}(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]jH)}(hjh]h...}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jGhjubah}(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&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubah}(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&]uh1jhjhhhNhNubj1)}(hhh]h}(h]h ]h"]h$]h&]entries](j=__acquire (C macro) c.__acquirehNtauh1j0hjhhhNhNubjB)}(hhh](jG)}(h __acquireh]jM)}(h __acquireh]jS)}(h __acquireh]jY)}(hj1h]h __acquire}(hj;hhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhj7ubah}(h]h ](jkjleh"]h$]h&]hhuh1jRhj3hhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMDubah}(h]h ]h"]h$]h&]hhjwuh1jLjxjyhj/hhhjNhMDubah}(h]j*ah ](j}j~eh"]h$]h&]jj)jhuh1jFhjNhMDhj,hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj,hhhjNhMDubeh}(h]h ](jmacroeh"]h$]h&]jjjjgjjgjjjuh1jAhhhjhNhNubh)}(h``__acquire (x)``h]jH)}(hjmh]h __acquire (x)}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jGhjkubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMFhjhhubj)}(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&]uh1jhjhMDhjhhubj)}(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]jH)}(hjh]hx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jGhjubah}(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&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMEhjubah}(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 }(hjhhhNhNubj)}(h**x**h]hx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh exclusively.}(hjhhhNhNubeh}(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&]uh1jhjhhhNhNubj1)}(hhh]h}(h]h ]h"]h$]h&]entries](j=__release (C macro) c.__releasehNtauh1j0hjhhhNhNubjB)}(hhh](jG)}(h __releaseh]jM)}(h __releaseh]jS)}(h __releaseh]jY)}(hjMh]h __release}(hjWhhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjSubah}(h]h ](jkjleh"]h$]h&]hhuh1jRhjOhhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMLubah}(h]h ]h"]h$]h&]hhjwuh1jLjxjyhjKhhhjjhMLubah}(h]jFah ](j}j~eh"]h$]h&]jj)jhuh1jFhjjhMLhjHhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjHhhhjjhMLubeh}(h]h ](jmacroeh"]h$]h&]jjjjjjjjjuh1jAhhhjhNhNubh)}(h``__release (x)``h]jH)}(hjh]h __release (x)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jGhjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMNhjhhubj)}(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&]uh1jhjhMLhjhhubj)}(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]jH)}(hjh]hx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jGhjubah}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMMhjubah}(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.hhMOhjubh)}(hCNo-op function that releases the given context lock instance **x**.h](h=No-op function that releases the given context lock instance }(hj.hhhNhNubj)}(h**x**h]hx}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.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.hhMNhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj1)}(hhh]h}(h]h ]h"]h$]h&]entries](j=__must_hold_shared (C macro)c.__must_hold_sharedhNtauh1j0hjhhhNhNubjB)}(hhh](jG)}(h__must_hold_sharedh]jM)}(h__must_hold_sharedh]jS)}(h__must_hold_sharedh]jY)}(hjih]h__must_hold_shared}(hjshhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjoubah}(h]h ](jkjleh"]h$]h&]hhuh1jRhjkhhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMTubah}(h]h ]h"]h$]h&]hhjwuh1jLjxjyhjghhhjhMTubah}(h]jbah ](j}j~eh"]h$]h&]jj)jhuh1jFhjhMThjdhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjdhhhjhMTubeh}(h]h ](jmacroeh"]h$]h&]jjjjjjjjjuh1jAhhhjhNhNubh)}(h``__must_hold_shared (...)``h]jH)}(hjh]h__must_hold_shared (...)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jGhjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMVhjhhubj)}(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&]uh1jhjhMThjhhubj)}(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]jH)}(hjh]h...}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jGhjubah}(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&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hj4h]h Description}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(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.}(hjJhhhNhNubah}(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&]uh1jhjhhhNhNubj1)}(hhh]h}(h]h ]h"]h$]h&]entries](j=__acquires_shared (C macro)c.__acquires_sharedhNtauh1j0hjhhhNhNubjB)}(hhh](jG)}(h__acquires_sharedh]jM)}(h__acquires_sharedh]jS)}(h__acquires_sharedh]jY)}(hjsh]h__acquires_shared}(hj}hhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjyubah}(h]h ](jkjleh"]h$]h&]hhuh1jRhjuhhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhM\ubah}(h]h ]h"]h$]h&]hhjwuh1jLjxjyhjqhhhjhM\ubah}(h]jlah ](j}j~eh"]h$]h&]jj)jhuh1jFhjhM\hjnhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjnhhhjhM\ubeh}(h]h ](jmacroeh"]h$]h&]jjjjjjjjjuh1jAhhhjhNhNubh)}(h``__acquires_shared (...)``h]jH)}(hjh]h__acquires_shared (...)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jGhjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhM^hjhhubj)}(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\hjhhubj)}(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.hhM`hjubj)}(hhh]j)}(h``...`` variable arguments h](j)}(h``...``h]jH)}(hjh]h...}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jGhjubah}(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&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubah}(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.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.}(hjThhhNhNubah}(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&]uh1jhjhhhNhNubj1)}(hhh]h}(h]h ]h"]h$]h&]entries](j= __cond_acquires_shared (C macro)c.__cond_acquires_sharedhNtauh1j0hjhhhNhNubjB)}(hhh](jG)}(h__cond_acquires_sharedh]jM)}(h__cond_acquires_sharedh]jS)}(h__cond_acquires_sharedh]jY)}(hj}h]h__cond_acquires_shared}(hjhhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjubah}(h]h ](jkjleh"]h$]h&]hhuh1jRhjhhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMdubah}(h]h ]h"]h$]h&]hhjwuh1jLjxjyhj{hhhjhMdubah}(h]jvah ](j}j~eh"]h$]h&]jj)jhuh1jFhjhMdhjxhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjxhhhjhMdubeh}(h]h ](jmacroeh"]h$]h&]jjjjjjjjjuh1jAhhhjhNhNubh)}(h#``__cond_acquires_shared (ret, x)``h]jH)}(hjh]h__cond_acquires_shared (ret, x)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jGhjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMfhjhhubj)}(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.hhMdhjubah}(h]h ]h"]h$]h&]uh1jhjhMdhjhhubj)}(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.hhMhhjubj)}(hhh](j)}(hE``ret`` abstract value returned by function if context lock acquired h](j)}(h``ret``h]jH)}(hj h]hret}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jGhj ubah}(h]h ]h"]h$]h&]uh1jhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMfhjubj)}(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.hhMlhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj1)}(hhh]h}(h]h ]h"]h$]h&]entries](j=__releases_shared (C macro)c.__releases_sharedhNtauh1j0hjhhhNhNubjB)}(hhh](jG)}(h__releases_sharedh]jM)}(h__releases_sharedh]jS)}(h__releases_sharedh]jY)}(hjh]h__releases_shared}(hj hhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjubah}(h]h ](jkjleh"]h$]h&]hhuh1jRhjhhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMrubah}(h]h ]h"]h$]h&]hhjwuh1jLjxjyhjhhhjhMrubah}(h]jah ](j}j~eh"]h$]h&]jj)jhuh1jFhjhMrhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhjhMrubeh}(h]h ](jmacroeh"]h$]h&]jjjj7jj7jjjuh1jAhhhjhNhNubh)}(h``__releases_shared (...)``h]jH)}(hj=h]h__releases_shared (...)}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jGhj;ubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMthjhhubj)}(hhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj>hhhj`hMubeh}(h]h ](jmacroeh"]h$]h&]jjjjyjjyjjjuh1jAhhhjhNhNubh)}(h"``__acquire_ret (call, ret_expr)``h]jH)}(hjh]h__acquire_ret (call, ret_expr)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jGhj}ubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMhjhhubj)}(h/helper to acquire context lock of return value h]h)}(h.helper to acquire context lock of return valueh]h.helper to acquire context lock of return value}(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&]uh1jhjhMhjhhubj)}(h]**Parameters** ``call`` call expression ``ret_expr`` acquire expression that uses __reth](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``call`` call expression h](j)}(h``call``h]jH)}(hjh]hcall}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jGhjubah}(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)}(hcall expressionh]hcall expression}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(h/``ret_expr`` acquire expression that uses __reth](j)}(h ``ret_expr``h]jH)}(hj h]hret_expr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jGhj ubah}(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"acquire expression that uses __reth]h"acquire expression that uses __ret}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMhj"ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj!hMhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj1)}(hhh]h}(h]h ]h"]h$]h&]entries](j=__acquire_shared_ret (C macro)c.__acquire_shared_rethNtauh1j0hjhhhNhNubjB)}(hhh](jG)}(h__acquire_shared_reth]jM)}(h__acquire_shared_reth]jS)}(h__acquire_shared_reth]jY)}(hj`h]h__acquire_shared_ret}(hjjhhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjfubah}(h]h ](jkjleh"]h$]h&]hhuh1jRhjbhhhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMubah}(h]h ]h"]h$]h&]hhjwuh1jLjxjyhj^hhhj}hMubah}(h]jYah ](j}j~eh"]h$]h&]jj)jhuh1jFhj}hMhj[hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj[hhhj}hMubeh}(h]h ](jmacroeh"]h$]h&]jjjjjjjjjuh1jAhhhjhNhNubh)}(h)``__acquire_shared_ret (call, ret_expr)``h]jH)}(hjh]h%__acquire_shared_ret (call, ret_expr)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jGhjubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMhjhhubj)}(h6helper to acquire context lock shared of return value h]h)}(h5helper to acquire context lock shared of return valueh]h5helper to acquire context lock shared of return value}(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&]uh1jhjhMhjhhubj)}(hd**Parameters** ``call`` call expression ``ret_expr`` acquire shared expression that uses __reth](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``call`` call expression h](j)}(h``call``h]jH)}(hjh]hcall}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jGhjubah}(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)}(hcall expressionh]hcall expression}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(h6``ret_expr`` acquire shared expression that uses __reth](j)}(h ``ret_expr``h]jH)}(hj)h]hret_expr}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jGhj'ubah}(h]h ]h"]h$]h&]uh1jhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMhj#ubj)}(hhh]h)}(h)acquire shared expression that uses __reth]h)acquire shared expression that uses __ret}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhu/var/lib/git/docbuild/linux/Documentation/dev-tools/context-analysis:124: ./include/linux/compiler-context-analysis.hhMhj?ubah}(h]h ]h"]h$]h&]uh1jhj#ubeh}(h]h ]h"]h$]h&]uh1jhj>hMhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hThe function attribute `__no_context_analysis` is reserved for internal implementation of context lock types, and should be avoided in normal code.h]h)}(hThe function attribute `__no_context_analysis` is reserved for internal implementation of context lock types, and should be avoided in normal code.h](hThe function attribute }(hjnhhhNhNubj>)}(h`__no_context_analysis`h]h__no_context_analysis}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjnubhe is reserved for internal implementation of context lock types, and should be avoided in normal code.}(hjnhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]keywordsah ]h"]keywordsah$]h&]uh1hhjhhhhhKzubeh}(h]programming-modelah ]h"]programming modelah$]h&]uh1hhhhhhhhK%ubh)}(hhh](h)}(h Backgroundh]h Background}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hX!Clang originally called the feature `Thread Safety Analysis `_, 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 Analysisj:5https://clang.llvm.org/docs/ThreadSafetyAnalysis.htmluh1j(hjubh)}(h8 h]h}(h]thread-safety-analysisah ]h"]thread safety analysisah$]h&]refurijuh1hjIKhjubh, 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 Systemsj:7https://www.cs.cornell.edu/talc/papers/capabilities.pdfuh1j(hjubh)}(h: h]h}(h]capability-systemsah ]h"]capability systemsah$]h&]refurijuh1hjIKhjubho, 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 hhhNhNubj>)}(h`-Wthread-safety`h]h-Wthread-safety}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj 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}j5 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_handlerj_ error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _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}(j5 hj4 j1 jjjEjBjjjjj, j) jjjju nametypes}(j5 j4 jjEjjj, jjuh}(hhj1 hjjjBj<jjljjj?jHjjjjjj!jjjz j j j j j j j j~jjjjjjjj j%j*j/jFjKjbjgjljqjvj{jjjj j j%j<jAjYj^j) jjjjju 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&]levelKtypeINFOsourcehlineKuh1j uba transformerN include_log] decorationNhhub.