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/locking/seqlockmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget#/translations/zh_TW/locking/seqlockmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget#/translations/it_IT/locking/seqlockmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget#/translations/ja_JP/locking/seqlockmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget#/translations/ko_KR/locking/seqlockmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget#/translations/sp_SP/locking/seqlockmodnameN 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:spacepreserveuh1hhhhhh=/var/lib/git/docbuild/linux/Documentation/locking/seqlock.rsthKubhsection)}(hhh](htitle)}(h&Sequence counters and sequential locksh]h&Sequence counters and sequential locks}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Introductionh]h Introduction}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hX4Sequence counters are a reader-writer consistency mechanism with lockless readers (read-only retry loops), and no writer starvation. They are used for data that's rarely written to (e.g. system time), where the reader wants a consistent set of information and is willing to retry if that information changes.h]hX6Sequence counters are a reader-writer consistency mechanism with lockless readers (read-only retry loops), and no writer starvation. They are used for data that’s rarely written to (e.g. system time), where the reader wants a consistent set of information and is willing to retry if that information changes.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hX}A data set is consistent when the sequence count at the beginning of the read side critical section is even and the same sequence count value is read again at the end of the critical section. The data in the set must be copied out inside the read side critical section. If the sequence count has changed between the start and the end of the critical section, the reader must retry.h]hX}A data set is consistent when the sequence count at the beginning of the read side critical section is even and the same sequence count value is read again at the end of the critical section. The data in the set must be copied out inside the read side critical section. If the sequence count has changed between the start and the end of the critical section, the reader must retry.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXHWriters increment the sequence count at the start and the end of their critical section. After starting the critical section the sequence count is odd and indicates to the readers that an update is in progress. At the end of the write side critical section the sequence count becomes even again which lets readers make progress.h]hXHWriters increment the sequence count at the start and the end of their critical section. After starting the critical section the sequence count is odd and indicates to the readers that an update is in progress. At the end of the write side critical section the sequence count becomes even again which lets readers make progress.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXSA sequence counter write side critical section must never be preempted or interrupted by read side sections. Otherwise the reader will spin for the entire scheduler tick due to the odd sequence count value and the interrupted writer. If that reader belongs to a real-time scheduling class, it can spin forever and the kernel will livelock.h]hXSA sequence counter write side critical section must never be preempted or interrupted by read side sections. Otherwise the reader will spin for the entire scheduler tick due to the odd sequence count value and the interrupted writer. If that reader belongs to a real-time scheduling class, it can spin forever and the kernel will livelock.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hThis mechanism cannot be used if the protected data contains pointers, as the writer can invalidate a pointer that the reader is following.h]hThis mechanism cannot be used if the protected data contains pointers, as the writer can invalidate a pointer that the reader is following.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hhhhubhtarget)}(h.. _seqcount_t:h]h}(h]h ]h"]h$]h&]refid seqcount-tuh1j"hK'hhhhhhubeh}(h] introductionah ]h"] introductionah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h"Sequence counters (``seqcount_t``)h](hSequence counters (}(hj;hhhNhNubhliteral)}(h``seqcount_t``h]h seqcount_t}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jChj;ubh)}(hj;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj8hhhhhK*ubh)}(hThis is the raw counting mechanism, which does not protect against multiple writers. Write side critical sections must thus be serialized by an external lock.h]hThis is the raw counting mechanism, which does not protect against multiple writers. Write side critical sections must thus be serialized by an external lock.}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hj8hhubh)}(hXBIf the write serialization primitive is not implicitly disabling preemption, preemption must be explicitly disabled before entering the write side section. If the read section can be invoked from hardirq or softirq contexts, interrupts or bottom halves must also be respectively disabled before entering the write section.h]hXBIf the write serialization primitive is not implicitly disabling preemption, preemption must be explicitly disabled before entering the write side section. If the read section can be invoked from hardirq or softirq contexts, interrupts or bottom halves must also be respectively disabled before entering the write section.}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK0hj8hhubh)}(hIf it's desired to automatically handle the sequence counter requirements of writer serialization and non-preemptibility, use :ref:`seqlock_t` instead.h](hIf it’s desired to automatically handle the sequence counter requirements of writer serialization and non-preemptibility, use }(hjyhhhNhNubh)}(h:ref:`seqlock_t`h]hinline)}(hjh]h seqlock_t}(hjhhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoclocking/seqlock refdomainjreftyperef refexplicitrefwarn reftarget seqlock_tuh1hhhhK6hjyubh instead.}(hjyhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK6hj8hhubh)}(hInitialization::h]hInitialization:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK:hj8hhubh literal_block)}(h/* dynamic */ seqcount_t foo_seqcount; seqcount_init(&foo_seqcount); /* static */ static seqcount_t foo_seqcount = SEQCNT_ZERO(foo_seqcount); /* C99 struct init */ struct { .seq = SEQCNT_ZERO(foo.seq), } foo;h]h/* dynamic */ seqcount_t foo_seqcount; seqcount_init(&foo_seqcount); /* static */ static seqcount_t foo_seqcount = SEQCNT_ZERO(foo_seqcount); /* C99 struct init */ struct { .seq = SEQCNT_ZERO(foo.seq), } foo;}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKh]h seqcount_t}(hj@hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj<ubah}(h]h ]h"]h$]h&]refdocj refdomainjJreftyperef refexplicitrefwarnj seqcount_tuh1hhhhKahj4ubhX!, sequence count write side critical sections must be serialized and non-preemptible. This variant of sequence counters associate the lock used for writer serialization at initialization time, which enables lockdep to validate that the write side critical sections are properly serialized.}(hj4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKahjhhubh)}(hX=This lock association is a NOOP if lockdep is disabled and has neither storage nor runtime overhead. If lockdep is enabled, the lock pointer is stored in struct seqcount and lockdep's "lock is held" assertions are injected at the beginning of the write side critical section to validate that it is properly protected.h]hXCThis lock association is a NOOP if lockdep is disabled and has neither storage nor runtime overhead. If lockdep is enabled, the lock pointer is stored in struct seqcount and lockdep’s “lock is held” assertions are injected at the beginning of the write side critical section to validate that it is properly protected.}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKghjhhubh)}(hxFor lock types which do not implicitly disable preemption, preemption protection is enforced in the write side function.h]hxFor lock types which do not implicitly disable preemption, preemption protection is enforced in the write side function.}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKmhjhhubh)}(hBThe following sequence counters with associated locks are defined:h]hBThe following sequence counters with associated locks are defined:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKphjhhubh block_quote)}(h- ``seqcount_spinlock_t`` - ``seqcount_raw_spinlock_t`` - ``seqcount_rwlock_t`` - ``seqcount_mutex_t`` - ``seqcount_ww_mutex_t`` h]h bullet_list)}(hhh](h list_item)}(h``seqcount_spinlock_t``h]h)}(hjh]jD)}(hjh]hseqcount_spinlock_t}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1hhhhKrhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h``seqcount_raw_spinlock_t``h]h)}(hjh]jD)}(hjh]hseqcount_raw_spinlock_t}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1hhhhKshjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h``seqcount_rwlock_t``h]h)}(hjh]jD)}(hjh]hseqcount_rwlock_t}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1hhhhKthjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h``seqcount_mutex_t``h]h)}(hjh]jD)}(hjh]hseqcount_mutex_t}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1hhhhKuhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h``seqcount_ww_mutex_t`` h]h)}(h``seqcount_ww_mutex_t``h]jD)}(hj#h]hseqcount_ww_mutex_t}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jChj!ubah}(h]h ]h"]h$]h&]uh1hhhhKvhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]bullet-uh1jhhhKrhjubah}(h]h ]h"]h$]h&]uh1jhhhKrhjhhubh)}(h}The sequence counter read and write APIs can take either a plain seqcount_t or any of the seqcount_LOCKNAME_t variants above.h]h}The sequence counter read and write APIs can take either a plain seqcount_t or any of the seqcount_LOCKNAME_t variants above.}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKxhjhhubh)}(hEInitialization (replace "LOCKNAME" with one of the supported locks)::h]hHInitialization (replace “LOCKNAME” with one of the supported locks):}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK{hjhhubj)}(hX&/* dynamic */ seqcount_LOCKNAME_t foo_seqcount; seqcount_LOCKNAME_init(&foo_seqcount, &lock); /* static */ static seqcount_LOCKNAME_t foo_seqcount = SEQCNT_LOCKNAME_ZERO(foo_seqcount, &lock); /* C99 struct init */ struct { .seq = SEQCNT_LOCKNAME_ZERO(foo.seq, &lock), } foo;h]hX&/* dynamic */ seqcount_LOCKNAME_t foo_seqcount; seqcount_LOCKNAME_init(&foo_seqcount, &lock); /* static */ static seqcount_LOCKNAME_t foo_seqcount = SEQCNT_LOCKNAME_ZERO(foo_seqcount, &lock); /* C99 struct init */ struct { .seq = SEQCNT_LOCKNAME_ZERO(foo.seq, &lock), } foo;}hjhsbah}(h]h ]h"]h$]h&]hhuh1jhhhK}hjhhubh)}(h}Write path: same as in :ref:`seqcount_t`, while running from a context with the associated write serialization lock acquired.h](hWrite path: same as in }(hjvhhhNhNubh)}(h:ref:`seqcount_t`h]j)}(hjh]h seqcount_t}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj~ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj seqcount_tuh1hhhhKhjvubhU, while running from a context with the associated write serialization lock acquired.}(hjvhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h(Read path: same as in :ref:`seqcount_t`.h](hRead path: same as in }(hjhhhNhNubh)}(h:ref:`seqcount_t`h]j)}(hjh]h seqcount_t}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj seqcount_tuh1hhhhKhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj#)}(h.. _seqcount_latch_t:h]h}(h]h ]h"]h$]h&]j.seqcount-latch-tuh1j"hKhjhhhhubeh}(h](;sequence-counters-with-associated-locks-seqcount-lockname-tjeh ]h"](=sequence counters with associated locks (seqcount_lockname_t)seqcount_locktype_teh$]h&]uh1hhj8hhhhhK_expect_referenced_by_name}jjsexpect_referenced_by_id}jjsubh)}(hhh](h)}(h.Latch sequence counters (``seqcount_latch_t``)h](hLatch sequence counters (}(hjhhhNhNubjD)}(h``seqcount_latch_t``h]hseqcount_latch_t}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjubh)}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hXLatch sequence counters are a multiversion concurrency control mechanism where the embedded seqcount_t counter even/odd value is used to switch between two copies of protected data. This allows the sequence counter read path to safely interrupt its own write side critical section.h]hXLatch sequence counters are a multiversion concurrency control mechanism where the embedded seqcount_t counter even/odd value is used to switch between two copies of protected data. This allows the sequence counter read path to safely interrupt its own write side critical section.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hUse seqcount_latch_t when the write side sections cannot be protected from interruption by readers. This is typically the case when the read side can be invoked from NMI handlers.h]hUse seqcount_latch_t when the write side sections cannot be protected from interruption by readers. This is typically the case when the read side can be invoked from NMI handlers.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h4Check `write_seqcount_latch()` for more information.h](hCheck }(hj1hhhNhNubhtitle_reference)}(h`write_seqcount_latch()`h]hwrite_seqcount_latch()}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j9hj1ubh for more information.}(hj1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj#)}(h.. _seqlock_t:h]h}(h]h ]h"]h$]h&]j. seqlock-tuh1j"hKhjhhhhubeh}(h]((latch-sequence-counters-seqcount-latch-tjeh ]h"](*latch sequence counters (seqcount_latch_t)seqcount_latch_teh$]h&]uh1hhj8hhhhhKj}jdjsj}jjsubeh}(h](sequence-counters-seqcount-tj/eh ]h"](sequence counters (seqcount_t) seqcount_teh$]h&]uh1hhhhhhhhK*j}joj$sj}j/j$subh)}(hhh](h)}(h Sequential locks (``seqlock_t``)h](hSequential locks (}(hjwhhhNhNubjD)}(h ``seqlock_t``h]h seqlock_t}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjwubh)}(hjwhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjthhhhhKubh)}(hThis contains the :ref:`seqcount_t` mechanism earlier discussed, plus an embedded spinlock for writer serialization and non-preemptibility.h](hThis contains the }(hjhhhNhNubh)}(h:ref:`seqcount_t`h]j)}(hjh]h seqcount_t}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj seqcount_tuh1hhhhKhjubhh mechanism earlier discussed, plus an embedded spinlock for writer serialization and non-preemptibility.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjthhubh)}(hIf the read side section can be invoked from hardirq or softirq context, use the write side function variants which disable interrupts or bottom halves respectively.h]hIf the read side section can be invoked from hardirq or softirq context, use the write side function variants which disable interrupts or bottom halves respectively.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjthhubh)}(hInitialization::h]hInitialization:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjthhubj)}(h/* dynamic */ seqlock_t foo_seqlock; seqlock_init(&foo_seqlock); /* static */ static DEFINE_SEQLOCK(foo_seqlock); /* C99 struct init */ struct { .seql = __SEQLOCK_UNLOCKED(foo.seql) } foo;h]h/* dynamic */ seqlock_t foo_seqlock; seqlock_init(&foo_seqlock); /* static */ static DEFINE_SEQLOCK(foo_seqlock); /* C99 struct init */ struct { .seql = __SEQLOCK_UNLOCKED(foo.seql) } foo;}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKhjthhubh)}(h Write path::h]h Write path:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjthhubj)}(hkwrite_seqlock(&foo_seqlock); /* ... [[write-side critical section]] ... */ write_sequnlock(&foo_seqlock);h]hkwrite_seqlock(&foo_seqlock); /* ... [[write-side critical section]] ... */ write_sequnlock(&foo_seqlock);}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKhjthhubh)}(hRead path, three categories:h]hRead path, three categories:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjthhubhenumerated_list)}(hhh](j)}(hXcNormal Sequence readers which never block a writer but they must retry if a writer is in progress by detecting change in the sequence number. Writers do not wait for a sequence reader:: do { seq = read_seqbegin(&foo_seqlock); /* ... [[read-side critical section]] ... */ } while (read_seqretry(&foo_seqlock, seq)); h](h)}(hNormal Sequence readers which never block a writer but they must retry if a writer is in progress by detecting change in the sequence number. Writers do not wait for a sequence reader::h]hNormal Sequence readers which never block a writer but they must retry if a writer is in progress by detecting change in the sequence number. Writers do not wait for a sequence reader:}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj"ubj)}(hdo { seq = read_seqbegin(&foo_seqlock); /* ... [[read-side critical section]] ... */ } while (read_seqretry(&foo_seqlock, seq));h]hdo { seq = read_seqbegin(&foo_seqlock); /* ... [[read-side critical section]] ... */ } while (read_seqretry(&foo_seqlock, seq));}hj4sbah}(h]h ]h"]h$]h&]hhuh1jhhhKhj"ubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hXLocking readers which will wait if a writer or another locking reader is in progress. A locking reader in progress will also block a writer from entering its critical section. This read lock is exclusive. Unlike rwlock_t, only one locking reader can acquire it:: read_seqlock_excl(&foo_seqlock); /* ... [[read-side critical section]] ... */ read_sequnlock_excl(&foo_seqlock); h](h)}(hXLocking readers which will wait if a writer or another locking reader is in progress. A locking reader in progress will also block a writer from entering its critical section. This read lock is exclusive. Unlike rwlock_t, only one locking reader can acquire it::h]hXLocking readers which will wait if a writer or another locking reader is in progress. A locking reader in progress will also block a writer from entering its critical section. This read lock is exclusive. Unlike rwlock_t, only one locking reader can acquire it:}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjHubj)}(hrread_seqlock_excl(&foo_seqlock); /* ... [[read-side critical section]] ... */ read_sequnlock_excl(&foo_seqlock);h]hrread_seqlock_excl(&foo_seqlock); /* ... [[read-side critical section]] ... */ read_sequnlock_excl(&foo_seqlock);}hjZsbah}(h]h ]h"]h$]h&]hhuh1jhhhKhjHubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hXConditional lockless reader (as in 1), or locking reader (as in 2), according to a passed marker. This is used to avoid lockless readers starvation (too much retry loops) in case of a sharp spike in write activity. First, a lockless read is tried (even marker passed). If that trial fails (odd sequence counter is returned, which is used as the next iteration marker), the lockless read is transformed to a full locking read and no retry loop is necessary:: /* marker; even initialization */ int seq = 0; do { read_seqbegin_or_lock(&foo_seqlock, &seq); /* ... [[read-side critical section]] ... */ } while (need_seqretry(&foo_seqlock, seq)); done_seqretry(&foo_seqlock, seq); h](h)}(hXConditional lockless reader (as in 1), or locking reader (as in 2), according to a passed marker. This is used to avoid lockless readers starvation (too much retry loops) in case of a sharp spike in write activity. First, a lockless read is tried (even marker passed). If that trial fails (odd sequence counter is returned, which is used as the next iteration marker), the lockless read is transformed to a full locking read and no retry loop is necessary::h]hXConditional lockless reader (as in 1), or locking reader (as in 2), according to a passed marker. This is used to avoid lockless readers starvation (too much retry loops) in case of a sharp spike in write activity. First, a lockless read is tried (even marker passed). If that trial fails (odd sequence counter is returned, which is used as the next iteration marker), the lockless read is transformed to a full locking read and no retry loop is necessary:}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjnubj)}(h/* marker; even initialization */ int seq = 0; do { read_seqbegin_or_lock(&foo_seqlock, &seq); /* ... [[read-side critical section]] ... */ } while (need_seqretry(&foo_seqlock, seq)); done_seqretry(&foo_seqlock, seq);h]h/* marker; even initialization */ int seq = 0; do { read_seqbegin_or_lock(&foo_seqlock, &seq); /* ... [[read-side critical section]] ... */ } while (need_seqretry(&foo_seqlock, seq)); done_seqretry(&foo_seqlock, seq);}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKhjnubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix.uh1jhjthhhhhKubeh}(h](sequential-locks-seqlock-tj]eh ]h"](sequential locks (seqlock_t) seqlock_teh$]h&]uh1hhhhhhhhKj}jjSsj}j]jSsubh)}(hhh](h)}(hAPI documentationh]hAPI documentation}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singleseqcount_init (C macro)c.seqcount_inithNtauh1jhjhhhNhNubhdesc)}(hhh](hdesc_signature)}(h seqcount_inith]hdesc_signature_line)}(h seqcount_inith]h desc_name)}(h seqcount_inith]h desc_sig_name)}(hjh]h seqcount_init}(hjhhhNhNubah}(h]h ]nah"]h$]h&]uh1jhjubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jhjhhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhK9ubah}(h]h ]h"]h$]h&]hh add_permalinkuh1jsphinx_line_type declaratorhjhhhjhK9ubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhjhK9hjhhubh desc_content)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhjhK9ubeh}(h]h ](cmacroeh"]h$]h&]domainjobjtypejdesctypejnoindex noindexentrynocontentsentryuh1jhhhjhNhNubh)}(h``seqcount_init (s)``h]jD)}(hj+h]hseqcount_init (s)}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jChj)ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhK;hjhhubj)}(h#runtime initializer for seqcount_t h]h)}(h"runtime initializer for seqcount_th]h"runtime initializer for seqcount_t}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhK9hjAubah}(h]h ]h"]h$]h&]uh1jhjShK9hjhhubh container)}(h:**Parameters** ``s`` Pointer to the seqcount_t instanceh](h)}(h**Parameters**h]hstrong)}(hjbh]h Parameters}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj`ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhK=hj\ubhdefinition_list)}(hhh]hdefinition_list_item)}(h(``s`` Pointer to the seqcount_t instanceh](hterm)}(h``s``h]jD)}(hjh]hs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhK?hjubh definition)}(hhh]h)}(h"Pointer to the seqcount_t instanceh]h"Pointer to the seqcount_t instance}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhK:hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK?hj|ubah}(h]h ]h"]h$]h&]uh1jzhj\ubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jSEQCNT_ZERO (C macro) c.SEQCNT_ZEROhNtauh1jhjhhhNhNubj)}(hhh](j)}(h SEQCNT_ZEROh]j)}(h SEQCNT_ZEROh]j)}(h SEQCNT_ZEROh]j)}(hjh]h SEQCNT_ZERO}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhKTubah}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhKTubah}(h]jah ](jj eh"]h$]h&]j j)jhuh1jhjhKThjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhjhKTubeh}(h]h ](jmacroeh"]h$]h&]j#jj$jj%jj&j'j(uh1jhhhjhNhNubh)}(h``SEQCNT_ZERO (name)``h]jD)}(hjh]hSEQCNT_ZERO (name)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhKVhjhhubj)}(h"static initializer for seqcount_t h]h)}(h!static initializer for seqcount_th]h!static initializer for seqcount_t}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhKThj1ubah}(h]h ]h"]h$]h&]uh1jhjChKThjhhubj[)}(h:**Parameters** ``name`` Name of the seqcount_t instanceh](h)}(h**Parameters**h]je)}(hjPh]h Parameters}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhKXhjJubj{)}(hhh]j)}(h(``name`` Name of the seqcount_t instanceh](j)}(h``name``h]jD)}(hjoh]hname}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjmubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhKZhjiubj)}(hhh]h)}(hName of the seqcount_t instanceh]hName of the seqcount_t instance}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhKUhjubah}(h]h ]h"]h$]h&]uh1jhjiubeh}(h]h ]h"]h$]h&]uh1jhjhKZhjfubah}(h]h ]h"]h$]h&]uh1jzhjJubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j__read_seqcount_begin (C macro)c.__read_seqcount_beginhNtauh1jhjhhhNhNubj)}(hhh](j)}(h__read_seqcount_beginh]j)}(h__read_seqcount_beginh]j)}(h__read_seqcount_beginh]j)}(hjh]h__read_seqcount_begin}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM ubah}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhM ubah}(h]jah ](jj eh"]h$]h&]j j)jhuh1jhjhM hjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhjhM ubeh}(h]h ](jmacroeh"]h$]h&]j#jj$jj%jj&j'j(uh1jhhhjhNhNubh)}(h``__read_seqcount_begin (s)``h]jD)}(hjh]h__read_seqcount_begin (s)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM hjhhubj)}(h begin a seqcount_t read section h]h)}(hbegin a seqcount_t read sectionh]hbegin a seqcount_t read section}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM hjubah}(h]h ]h"]h$]h&]uh1jhj'hM hjhhubj[)}(h**Parameters** ``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants **Return** count to be passed to read_seqcount_retry()h](h)}(h**Parameters**h]je)}(hj4h]h Parameters}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj2ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj.ubj{)}(hhh]j)}(hG``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants h](j)}(h``s``h]jD)}(hjSh]hs}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjQubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM hjMubj)}(hhh]h)}(h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variantsh]h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhM hjiubah}(h]h ]h"]h$]h&]uh1jhjMubeh}(h]h ]h"]h$]h&]uh1jhjhhM hjJubah}(h]h ]h"]h$]h&]uh1jzhj.ubh)}(h **Return**h]je)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM hj.ubh)}(h+count to be passed to read_seqcount_retry()h]h+count to be passed to read_seqcount_retry()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM hj.ubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!raw_read_seqcount_begin (C macro)c.raw_read_seqcount_beginhNtauh1jhjhhhNhNubj)}(hhh](j)}(hraw_read_seqcount_beginh]j)}(hraw_read_seqcount_beginh]j)}(hraw_read_seqcount_beginh]j)}(hjh]hraw_read_seqcount_begin}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMubah}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhMubah}(h]jah ](jj eh"]h$]h&]j j)jhuh1jhjhMhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](jmacroeh"]h$]h&]j#jj$j j%j j&j'j(uh1jhhhjhNhNubh)}(h``raw_read_seqcount_begin (s)``h]jD)}(hj h]hraw_read_seqcount_begin (s)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jChj ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjhhubj)}(h,begin a seqcount_t read section w/o lockdep h]h)}(h+begin a seqcount_t read section w/o lockdeph]h+begin a seqcount_t read section w/o lockdep}(hj# hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj ubah}(h]h ]h"]h$]h&]uh1jhj1 hMhjhhubj[)}(h**Parameters** ``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants **Return** count to be passed to read_seqcount_retry()h](h)}(h**Parameters**h]je)}(hj> h]h Parameters}(hj@ hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj< ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj8 ubj{)}(hhh]j)}(hG``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants h](j)}(h``s``h]jD)}(hj] h]hs}(hj_ hhhNhNubah}(h]h ]h"]h$]h&]uh1jChj[ ubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjW ubj)}(hhh]h)}(h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variantsh]h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants}(hjv hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjr hMhjs ubah}(h]h ]h"]h$]h&]uh1jhjW ubeh}(h]h ]h"]h$]h&]uh1jhjr hMhjT ubah}(h]h ]h"]h$]h&]uh1jzhj8 ubh)}(h **Return**h]je)}(hj h]hReturn}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj8 ubh)}(h+count to be passed to read_seqcount_retry()h]h+count to be passed to read_seqcount_retry()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj8 ubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jread_seqcount_begin (C macro)c.read_seqcount_beginhNtauh1jhjhhhNhNubj)}(hhh](j)}(hread_seqcount_beginh]j)}(hread_seqcount_beginh]j)}(hread_seqcount_beginh]j)}(hj h]hread_seqcount_begin}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj hhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM#ubah}(h]h ]h"]h$]h&]hhjuh1jjjhj hhhj hM#ubah}(h]j ah ](jj eh"]h$]h&]j j)jhuh1jhj hM#hj hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj hhhj hM#ubeh}(h]h ](jmacroeh"]h$]h&]j#jj$j j%j j&j'j(uh1jhhhjhNhNubh)}(h``read_seqcount_begin (s)``h]jD)}(hj h]hread_seqcount_begin (s)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jChj ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM%hjhhubj)}(h)begin a seqcount_t read critical section h]h)}(h(begin a seqcount_t read critical sectionh]h(begin a seqcount_t read critical section}(hj- hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM#hj) ubah}(h]h ]h"]h$]h&]uh1jhj; hM#hjhhubj[)}(h**Parameters** ``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants **Return** count to be passed to read_seqcount_retry()h](h)}(h**Parameters**h]je)}(hjH h]h Parameters}(hjJ hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjF ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM'hjB ubj{)}(hhh]j)}(hG``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants h](j)}(h``s``h]jD)}(hjg h]hs}(hji hhhNhNubah}(h]h ]h"]h$]h&]uh1jChje ubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM$hja ubj)}(hhh]h)}(h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variantsh]h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj| hM$hj} ubah}(h]h ]h"]h$]h&]uh1jhja ubeh}(h]h ]h"]h$]h&]uh1jhj| hM$hj^ ubah}(h]h ]h"]h$]h&]uh1jzhjB ubh)}(h **Return**h]je)}(hj h]hReturn}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM&hjB ubh)}(h+count to be passed to read_seqcount_retry()h]h+count to be passed to read_seqcount_retry()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM&hjB ubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jraw_read_seqcount (C macro)c.raw_read_seqcounthNtauh1jhjhhhNhNubj)}(hhh](j)}(hraw_read_seqcounth]j)}(hraw_read_seqcounth]j)}(hraw_read_seqcounth]j)}(hj h]hraw_read_seqcount}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj hhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM/ubah}(h]h ]h"]h$]h&]hhjuh1jjjhj hhhj hM/ubah}(h]j ah ](jj eh"]h$]h&]j j)jhuh1jhj hM/hj hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj hhhj hM/ubeh}(h]h ](jmacroeh"]h$]h&]j#jj$j j%j j&j'j(uh1jhhhjhNhNubh)}(h``raw_read_seqcount (s)``h]jD)}(hj h]hraw_read_seqcount (s)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jChj ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM1hjhhubj)}(h&read the raw seqcount_t counter value h]h)}(h%read the raw seqcount_t counter valueh]h%read the raw seqcount_t counter value}(hj7 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM/hj3 ubah}(h]h ]h"]h$]h&]uh1jhjE hM/hjhhubj[)}(hXs**Parameters** ``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants **Description** raw_read_seqcount opens a read critical section of the given seqcount_t, without any lockdep checking, and without checking or masking the sequence counter LSB. Calling code is responsible for handling that. **Return** count to be passed to read_seqcount_retry()h](h)}(h**Parameters**h]je)}(hjR h]h Parameters}(hjT hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjP ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM3hjL ubj{)}(hhh]j)}(hG``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants h](j)}(h``s``h]jD)}(hjq h]hs}(hjs hhhNhNubah}(h]h ]h"]h$]h&]uh1jChjo ubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM0hjk ubj)}(hhh]h)}(h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variantsh]h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hM0hj ubah}(h]h ]h"]h$]h&]uh1jhjk ubeh}(h]h ]h"]h$]h&]uh1jhj hM0hjh ubah}(h]h ]h"]h$]h&]uh1jzhjL ubh)}(h**Description**h]je)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM2hjL ubh)}(hraw_read_seqcount opens a read critical section of the given seqcount_t, without any lockdep checking, and without checking or masking the sequence counter LSB. Calling code is responsible for handling that.h]hraw_read_seqcount opens a read critical section of the given seqcount_t, without any lockdep checking, and without checking or masking the sequence counter LSB. Calling code is responsible for handling that.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM1hjL ubh)}(h **Return**h]je)}(hj h]hReturn}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM6hjL ubh)}(h+count to be passed to read_seqcount_retry()h]h+count to be passed to read_seqcount_retry()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM7hjL ubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j raw_seqcount_try_begin (C macro)c.raw_seqcount_try_beginhNtauh1jhjhhhNhNubj)}(hhh](j)}(hraw_seqcount_try_beginh]j)}(hraw_seqcount_try_beginh]j)}(hraw_seqcount_try_beginh]j)}(hj h]hraw_seqcount_try_begin}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj hhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMBubah}(h]h ]h"]h$]h&]hhjuh1jjjhj hhhj/ hMBubah}(h]j ah ](jj eh"]h$]h&]j j)jhuh1jhj/ hMBhj hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj hhhj/ hMBubeh}(h]h ](jmacroeh"]h$]h&]j#jj$jH j%jH j&j'j(uh1jhhhjhNhNubh)}(h%``raw_seqcount_try_begin (s, start)``h]jD)}(hjN h]h!raw_seqcount_try_begin (s, start)}(hjP hhhNhNubah}(h]h ]h"]h$]h&]uh1jChjL ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMDhjhhubj)}(hSbegin a seqcount_t read critical section w/o lockdep and w/o counter stabilization h]h)}(hRbegin a seqcount_t read critical section w/o lockdep and w/o counter stabilizationh]hRbegin a seqcount_t read critical section w/o lockdep and w/o counter stabilization}(hjh hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMBhjd ubah}(h]h ]h"]h$]h&]uh1jhjv hMBhjhhubj[)}(hX.**Parameters** ``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants ``start`` count to be passed to read_seqcount_retry() **Description** Similar to raw_seqcount_begin(), except it enables eliding the critical section entirely if odd, instead of doing the speculation knowing it will fail. Useful when counter stabilization is more or less equivalent to taking the lock and there is a slowpath that does that. If true, start will be set to the (even) sequence count read. **Return** true when a read critical section is started.h](h)}(h**Parameters**h]je)}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMFhj} ubj{)}(hhh](j)}(hG``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants h](j)}(h``s``h]jD)}(hj h]hs}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jChj ubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMDhj ubj)}(hhh]h)}(h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variantsh]h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMDhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hMDhj ubj)}(h6``start`` count to be passed to read_seqcount_retry() h](j)}(h ``start``h]jD)}(hj h]hstart}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jChj ubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMEhj ubj)}(hhh]h)}(h+count to be passed to read_seqcount_retry()h]h+count to be passed to read_seqcount_retry()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMEhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hMEhj ubeh}(h]h ]h"]h$]h&]uh1jzhj} ubh)}(h**Description**h]je)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMGhj} ubh)}(hSimilar to raw_seqcount_begin(), except it enables eliding the critical section entirely if odd, instead of doing the speculation knowing it will fail.h]hSimilar to raw_seqcount_begin(), except it enables eliding the critical section entirely if odd, instead of doing the speculation knowing it will fail.}(hj, hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMFhj} ubh)}(hwUseful when counter stabilization is more or less equivalent to taking the lock and there is a slowpath that does that.h]hwUseful when counter stabilization is more or less equivalent to taking the lock and there is a slowpath that does that.}(hj; hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMJhj} ubh)}(h=If true, start will be set to the (even) sequence count read.h]h=If true, start will be set to the (even) sequence count read.}(hjJ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMMhj} ubh)}(h **Return**h]je)}(hj[ h]hReturn}(hj] hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjY ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMOhj} ubh)}(h-true when a read critical section is started.h]h-true when a read critical section is started.}(hjq hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMPhj} ubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jraw_seqcount_begin (C macro)c.raw_seqcount_beginhNtauh1jhjhhhNhNubj)}(hhh](j)}(hraw_seqcount_beginh]j)}(hraw_seqcount_beginh]j)}(hraw_seqcount_beginh]j)}(hj h]hraw_seqcount_begin}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj hhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMYubah}(h]h ]h"]h$]h&]hhjuh1jjjhj hhhj hMYubah}(h]j ah ](jj eh"]h$]h&]j j)jhuh1jhj hMYhj hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj hhhj hMYubeh}(h]h ](jmacroeh"]h$]h&]j#jj$j j%j j&j'j(uh1jhhhjhNhNubh)}(h``raw_seqcount_begin (s)``h]jD)}(hj h]hraw_seqcount_begin (s)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jChj ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM[hjhhubj)}(hSbegin a seqcount_t read critical section w/o lockdep and w/o counter stabilization h]h)}(hRbegin a seqcount_t read critical section w/o lockdep and w/o counter stabilizationh]hRbegin a seqcount_t read critical section w/o lockdep and w/o counter stabilization}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMYhj ubah}(h]h ]h"]h$]h&]uh1jhj hMYhjhhubj[)}(hX**Parameters** ``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants **Description** raw_seqcount_begin opens a read critical section of the given seqcount_t. Unlike read_seqcount_begin(), this function will not wait for the count to stabilize. If a writer is active when it begins, it will fail the read_seqcount_retry() at the end of the read critical section instead of stabilizing at the beginning of it. Use this only in special kernel hot paths where the read section is small and has a high probability of success through other external means. It will save a single branching instruction. **Return** count to be passed to read_seqcount_retry()h](h)}(h**Parameters**h]je)}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM]hjubj{)}(hhh]j)}(hG``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants h](j)}(h``s``h]jD)}(hj*h]hs}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jChj(ubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM[hj$ubj)}(hhh]h)}(h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variantsh]h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?hM[hj@ubah}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]uh1jhj?hM[hj!ubah}(h]h ]h"]h$]h&]uh1jzhjubh)}(h**Description**h]je)}(hjeh]h Description}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjcubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM]hjubh)}(hXCraw_seqcount_begin opens a read critical section of the given seqcount_t. Unlike read_seqcount_begin(), this function will not wait for the count to stabilize. If a writer is active when it begins, it will fail the read_seqcount_retry() at the end of the read critical section instead of stabilizing at the beginning of it.h]hXCraw_seqcount_begin opens a read critical section of the given seqcount_t. Unlike read_seqcount_begin(), this function will not wait for the count to stabilize. If a writer is active when it begins, it will fail the read_seqcount_retry() at the end of the read critical section instead of stabilizing at the beginning of it.}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM\hjubh)}(hUse this only in special kernel hot paths where the read section is small and has a high probability of success through other external means. It will save a single branching instruction.h]hUse this only in special kernel hot paths where the read section is small and has a high probability of success through other external means. It will save a single branching instruction.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMbhjubh)}(h **Return**h]je)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMfhjubh)}(h+count to be passed to read_seqcount_retry()h]h+count to be passed to read_seqcount_retry()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMghjubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j__read_seqcount_retry (C macro)c.__read_seqcount_retryhNtauh1jhjhhhNhNubj)}(hhh](j)}(h__read_seqcount_retryh]j)}(h__read_seqcount_retryh]j)}(h__read_seqcount_retryh]j)}(hjh]h__read_seqcount_retry}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMsubah}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhMsubah}(h]jah ](jj eh"]h$]h&]j j)jhuh1jhjhMshjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhjhMsubeh}(h]h ](jmacroeh"]h$]h&]j#jj$jj%jj&j'j(uh1jhhhjhNhNubh)}(h$``__read_seqcount_retry (s, start)``h]jD)}(hjh]h __read_seqcount_retry (s, start)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMuhjhhubj)}(h*end a seqcount_t read section w/o barrier h]h)}(h)end a seqcount_t read section w/o barrierh]h)end a seqcount_t read section w/o barrier}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMshj,ubah}(h]h ]h"]h$]h&]uh1jhj>hMshjhhubj[)}(hX$**Parameters** ``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants ``start`` count, from read_seqcount_begin() **Description** __read_seqcount_retry is like read_seqcount_retry, but has no smp_rmb() barrier. Callers should ensure that smp_rmb() or equivalent ordering is provided before actually loading any of the variables that are to be protected in this critical section. Use carefully, only in critical code, and comment how the barrier is provided. **Return** true if a read section retry is required, else falseh](h)}(h**Parameters**h]je)}(hjKh]h Parameters}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjIubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMwhjEubj{)}(hhh](j)}(hG``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants h](j)}(h``s``h]jD)}(hjjh]hs}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjhubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMthjdubj)}(hhh]h)}(h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variantsh]h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMthjubah}(h]h ]h"]h$]h&]uh1jhjdubeh}(h]h ]h"]h$]h&]uh1jhjhMthjaubj)}(h,``start`` count, from read_seqcount_begin() h](j)}(h ``start``h]jD)}(hjh]hstart}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMuhjubj)}(hhh]h)}(h!count, from read_seqcount_begin()h]h!count, from read_seqcount_begin()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMuhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMuhjaubeh}(h]h ]h"]h$]h&]uh1jzhjEubh)}(h**Description**h]je)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMwhjEubh)}(h__read_seqcount_retry is like read_seqcount_retry, but has no smp_rmb() barrier. Callers should ensure that smp_rmb() or equivalent ordering is provided before actually loading any of the variables that are to be protected in this critical section.h]h__read_seqcount_retry is like read_seqcount_retry, but has no smp_rmb() barrier. Callers should ensure that smp_rmb() or equivalent ordering is provided before actually loading any of the variables that are to be protected in this critical section.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMvhjEubh)}(hNUse carefully, only in critical code, and comment how the barrier is provided.h]hNUse carefully, only in critical code, and comment how the barrier is provided.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM{hjEubh)}(h **Return**h]je)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM~hjEubh)}(h4true if a read section retry is required, else falseh]h4true if a read section retry is required, else false}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjEubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jread_seqcount_retry (C macro)c.read_seqcount_retryhNtauh1jhjhhhNhNubj)}(hhh](j)}(hread_seqcount_retryh]j)}(hread_seqcount_retryh]j)}(hread_seqcount_retryh]j)}(hjSh]hread_seqcount_retry}(hj]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjYubah}(h]h ](jjeh"]h$]h&]hhuh1jhjUhhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMubah}(h]h ]h"]h$]h&]hhjuh1jjjhjQhhhjphMubah}(h]jLah ](jj eh"]h$]h&]j j)jhuh1jhjphMhjNhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjNhhhjphMubeh}(h]h ](jmacroeh"]h$]h&]j#jj$jj%jj&j'j(uh1jhhhjhNhNubh)}(h"``read_seqcount_retry (s, start)``h]jD)}(hjh]hread_seqcount_retry (s, start)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjhhubj)}(h'end a seqcount_t read critical section h]h)}(h&end a seqcount_t read critical sectionh]h&end a seqcount_t read critical section}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjubah}(h]h ]h"]h$]h&]uh1jhjhMhjhhubj[)}(hXw**Parameters** ``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants ``start`` count, from read_seqcount_begin() **Description** read_seqcount_retry closes the read critical section of given seqcount_t. If the critical section was invalid, it must be ignored (and typically retried). **Return** true if a read section retry is required, else falseh](h)}(h**Parameters**h]je)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjubj{)}(hhh](j)}(hG``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants h](j)}(h``s``h]jD)}(hjh]hs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjubj)}(hhh]h)}(h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variantsh]h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(h,``start`` count, from read_seqcount_begin() h](j)}(h ``start``h]jD)}(hjh]hstart}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjubj)}(hhh]h)}(h!count, from read_seqcount_begin()h]h!count, from read_seqcount_begin()}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hMhj2ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj1hMhjubeh}(h]h ]h"]h$]h&]uh1jzhjubh)}(h**Description**h]je)}(hjWh]h Description}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjUubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjubh)}(hread_seqcount_retry closes the read critical section of given seqcount_t. If the critical section was invalid, it must be ignored (and typically retried).h]hread_seqcount_retry closes the read critical section of given seqcount_t. If the critical section was invalid, it must be ignored (and typically retried).}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjubh)}(h **Return**h]je)}(hj~h]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj|ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjubh)}(h4true if a read section retry is required, else falseh]h4true if a read section retry is required, else false}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"raw_write_seqcount_begin (C macro)c.raw_write_seqcount_beginhNtauh1jhjhhhNhNubj)}(hhh](j)}(hraw_write_seqcount_beginh]j)}(hraw_write_seqcount_beginh]j)}(hraw_write_seqcount_beginh]j)}(hjh]hraw_write_seqcount_begin}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMubah}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhMubah}(h]jah ](jj eh"]h$]h&]j j)jhuh1jhjhMhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](jmacroeh"]h$]h&]j#jj$jj%jj&j'j(uh1jhhhjhNhNubh)}(h ``raw_write_seqcount_begin (s)``h]jD)}(hjh]hraw_write_seqcount_begin (s)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjhhubj)}(h-start a seqcount_t write section w/o lockdep h]h)}(h,start a seqcount_t write section w/o lockdeph]h,start a seqcount_t write section w/o lockdep}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjubah}(h]h ]h"]h$]h&]uh1jhj!hMhjhhubj[)}(h**Parameters** ``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants **Context** check write_seqcount_begin()h](h)}(h**Parameters**h]je)}(hj.h]h Parameters}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj,ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj(ubj{)}(hhh]j)}(hG``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants h](j)}(h``s``h]jD)}(hjMh]hs}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjKubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjGubj)}(hhh]h)}(h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variantsh]h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjbhMhjcubah}(h]h ]h"]h$]h&]uh1jhjGubeh}(h]h ]h"]h$]h&]uh1jhjbhMhjDubah}(h]h ]h"]h$]h&]uh1jzhj(ubh)}(h **Context**h]je)}(hjh]hContext}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj(ubh)}(hcheck write_seqcount_begin()h]hcheck write_seqcount_begin()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj(ubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j raw_write_seqcount_end (C macro)c.raw_write_seqcount_endhNtauh1jhjhhhNhNubj)}(hhh](j)}(hraw_write_seqcount_endh]j)}(hraw_write_seqcount_endh]j)}(hraw_write_seqcount_endh]j)}(hjh]hraw_write_seqcount_end}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMubah}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhMubah}(h]jah ](jj eh"]h$]h&]j j)jhuh1jhjhMhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](jmacroeh"]h$]h&]j#jj$jj%jj&j'j(uh1jhhhjhNhNubh)}(h``raw_write_seqcount_end (s)``h]jD)}(hjh]hraw_write_seqcount_end (s)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjhhubj)}(h+end a seqcount_t write section w/o lockdep h]h)}(h*end a seqcount_t write section w/o lockdeph]h*end a seqcount_t write section w/o lockdep}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjubah}(h]h ]h"]h$]h&]uh1jhj+hMhjhhubj[)}(h**Parameters** ``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants **Context** check write_seqcount_end()h](h)}(h**Parameters**h]je)}(hj8h]h Parameters}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj6ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj2ubj{)}(hhh]j)}(hG``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants h](j)}(h``s``h]jD)}(hjWh]hs}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjUubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjQubj)}(hhh]h)}(h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variantsh]h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlhMhjmubah}(h]h ]h"]h$]h&]uh1jhjQubeh}(h]h ]h"]h$]h&]uh1jhjlhMhjNubah}(h]h ]h"]h$]h&]uh1jzhj2ubh)}(h **Context**h]je)}(hjh]hContext}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj2ubh)}(hcheck write_seqcount_end()h]hcheck write_seqcount_end()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj2ubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j%write_seqcount_begin_nested (C macro)c.write_seqcount_begin_nestedhNtauh1jhjhhhNhNubj)}(hhh](j)}(hwrite_seqcount_begin_nestedh]j)}(hwrite_seqcount_begin_nestedh]j)}(hwrite_seqcount_begin_nestedh]j)}(hjh]hwrite_seqcount_begin_nested}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMubah}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhMubah}(h]jah ](jj eh"]h$]h&]j j)jhuh1jhjhMhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](jmacroeh"]h$]h&]j#jj$jj%jj&j'j(uh1jhhhjhNhNubh)}(h-``write_seqcount_begin_nested (s, subclass)``h]jD)}(hj h]h)write_seqcount_begin_nested (s, subclass)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jChj ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjhhubj)}(hCstart a seqcount_t write section with custom lockdep nesting level h]h)}(hBstart a seqcount_t write section with custom lockdep nesting levelh]hBstart a seqcount_t write section with custom lockdep nesting level}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj#ubah}(h]h ]h"]h$]h&]uh1jhj5hMhjhhubj[)}(h**Parameters** ``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants ``subclass`` lockdep nesting level **Description** See Documentation/locking/lockdep-design.rst **Context** check write_seqcount_begin()h](h)}(h**Parameters**h]je)}(hjBh]h Parameters}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj@ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj<ubj{)}(hhh](j)}(hG``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants h](j)}(h``s``h]jD)}(hjah]hs}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jChj_ubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj[ubj)}(hhh]h)}(h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variantsh]h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjvhMhjwubah}(h]h ]h"]h$]h&]uh1jhj[ubeh}(h]h ]h"]h$]h&]uh1jhjvhMhjXubj)}(h#``subclass`` lockdep nesting level h](j)}(h ``subclass``h]jD)}(hjh]hsubclass}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjubj)}(hhh]h)}(hlockdep nesting levelh]hlockdep nesting level}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjXubeh}(h]h ]h"]h$]h&]uh1jzhj<ubh)}(h**Description**h]je)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj<ubh)}(h,See Documentation/locking/lockdep-design.rsth]h,See Documentation/locking/lockdep-design.rst}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj<ubh)}(h **Context**h]je)}(hjh]hContext}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj<ubh)}(hcheck write_seqcount_begin()h]hcheck write_seqcount_begin()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj<ubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jwrite_seqcount_begin (C macro)c.write_seqcount_beginhNtauh1jhjhhhNhNubj)}(hhh](j)}(hwrite_seqcount_beginh]j)}(hwrite_seqcount_beginh]j)}(hwrite_seqcount_beginh]j)}(hj;h]hwrite_seqcount_begin}(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjAubah}(h]h ](jjeh"]h$]h&]hhuh1jhj=hhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMubah}(h]h ]h"]h$]h&]hhjuh1jjjhj9hhhjXhMubah}(h]j4ah ](jj eh"]h$]h&]j j)jhuh1jhjXhMhj6hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj6hhhjXhMubeh}(h]h ](jmacroeh"]h$]h&]j#jj$jqj%jqj&j'j(uh1jhhhjhNhNubh)}(h``write_seqcount_begin (s)``h]jD)}(hjwh]hwrite_seqcount_begin (s)}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjuubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjhhubj)}(h/start a seqcount_t write side critical section h]h)}(h.start a seqcount_t write side critical sectionh]h.start a seqcount_t write side critical section}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjubah}(h]h ]h"]h$]h&]uh1jhjhMhjhhubj[)}(hX**Parameters** ``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants **Context** sequence counter write side sections must be serialized and non-preemptible. Preemption will be automatically disabled if and only if the seqcount write serialization lock is associated, and preemptible. If readers can be invoked from hardirq or softirq context, interrupts or bottom halves must be respectively disabled.h](h)}(h**Parameters**h]je)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjubj{)}(hhh]j)}(hG``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants h](j)}(h``s``h]jD)}(hjh]hs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjubj)}(hhh]h)}(h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variantsh]h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubah}(h]h ]h"]h$]h&]uh1jzhjubh)}(h **Context**h]je)}(hjh]hContext}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjubh)}(hXBsequence counter write side sections must be serialized and non-preemptible. Preemption will be automatically disabled if and only if the seqcount write serialization lock is associated, and preemptible. If readers can be invoked from hardirq or softirq context, interrupts or bottom halves must be respectively disabled.h]hXBsequence counter write side sections must be serialized and non-preemptible. Preemption will be automatically disabled if and only if the seqcount write serialization lock is associated, and preemptible. If readers can be invoked from hardirq or softirq context, interrupts or bottom halves must be respectively disabled.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jwrite_seqcount_end (C macro)c.write_seqcount_endhNtauh1jhjhhhNhNubj)}(hhh](j)}(hwrite_seqcount_endh]j)}(hwrite_seqcount_endh]j)}(hwrite_seqcount_endh]j)}(hjEh]hwrite_seqcount_end}(hjOhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjKubah}(h]h ](jjeh"]h$]h&]hhuh1jhjGhhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMubah}(h]h ]h"]h$]h&]hhjuh1jjjhjChhhjbhMubah}(h]j>ah ](jj eh"]h$]h&]j j)jhuh1jhjbhMhj@hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj@hhhjbhMubeh}(h]h ](jmacroeh"]h$]h&]j#jj$j{j%j{j&j'j(uh1jhhhjhNhNubh)}(h``write_seqcount_end (s)``h]jD)}(hjh]hwrite_seqcount_end (s)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjhhubj)}(h-end a seqcount_t write side critical section h]h)}(h,end a seqcount_t write side critical sectionh]h,end a seqcount_t write side critical section}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjubah}(h]h ]h"]h$]h&]uh1jhjhMhjhhubj[)}(h**Parameters** ``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants **Context** Preemption will be automatically re-enabled if and only if the seqcount write serialization lock is associated, and preemptible.h](h)}(h**Parameters**h]je)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjubj{)}(hhh]j)}(hG``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants h](j)}(h``s``h]jD)}(hjh]hs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjubj)}(hhh]h)}(h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variantsh]h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubah}(h]h ]h"]h$]h&]uh1jzhjubh)}(h **Context**h]je)}(hjh]hContext}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjubh)}(hPreemption will be automatically re-enabled if and only if the seqcount write serialization lock is associated, and preemptible.h]hPreemption will be automatically re-enabled if and only if the seqcount write serialization lock is associated, and preemptible.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$raw_write_seqcount_barrier (C macro)c.raw_write_seqcount_barrierhNtauh1jhjhhhNhNubj)}(hhh](j)}(hraw_write_seqcount_barrierh]j)}(hraw_write_seqcount_barrierh]j)}(hraw_write_seqcount_barrierh]j)}(hjOh]hraw_write_seqcount_barrier}(hjYhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjUubah}(h]h ](jjeh"]h$]h&]hhuh1jhjQhhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMubah}(h]h ]h"]h$]h&]hhjuh1jjjhjMhhhjlhMubah}(h]jHah ](jj eh"]h$]h&]j j)jhuh1jhjlhMhjJhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjJhhhjlhMubeh}(h]h ](jmacroeh"]h$]h&]j#jj$jj%jj&j'j(uh1jhhhjhNhNubh)}(h"``raw_write_seqcount_barrier (s)``h]jD)}(hjh]hraw_write_seqcount_barrier (s)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjhhubj)}(hdo a seqcount_t write barrier h]h)}(hdo a seqcount_t write barrierh]hdo a seqcount_t write barrier}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjubah}(h]h ]h"]h$]h&]uh1jhjhMhjhhubj[)}(hX**Parameters** ``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants **Description** This can be used to provide an ordering guarantee instead of the usual consistency guarantee. It is one wmb cheaper, because it can collapse the two back-to-back wmb()s. Note that writes surrounding the barrier should be declared atomic (e.g. via WRITE_ONCE): a) to ensure the writes become visible to other threads atomically, avoiding compiler optimizations; b) to document which writes are meant to propagate to the reader critical section. This is necessary because neither writes before nor after the barrier are enclosed in a seq-writer critical section that would ensure readers are aware of ongoing writes:: seqcount_t seq; bool X = true, Y = false; void read(void) { bool x, y; do { int s = read_seqcount_begin(&seq); x = X; y = Y; } while (read_seqcount_retry(&seq, s)); BUG_ON(!x && !y); } void write(void) { WRITE_ONCE(Y, true); raw_write_seqcount_barrier(seq); WRITE_ONCE(X, false); }h](h)}(h**Parameters**h]je)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjubj{)}(hhh]j)}(hG``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants h](j)}(h``s``h]jD)}(hjh]hs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjubj)}(hhh]h)}(h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variantsh]h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubah}(h]h ]h"]h$]h&]uh1jzhjubh)}(h**Description**h]je)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjubh)}(hThis can be used to provide an ordering guarantee instead of the usual consistency guarantee. It is one wmb cheaper, because it can collapse the two back-to-back wmb()s.h]hThis can be used to provide an ordering guarantee instead of the usual consistency guarantee. It is one wmb cheaper, because it can collapse the two back-to-back wmb()s.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjubh)}(hXNote that writes surrounding the barrier should be declared atomic (e.g. via WRITE_ONCE): a) to ensure the writes become visible to other threads atomically, avoiding compiler optimizations; b) to document which writes are meant to propagate to the reader critical section. This is necessary because neither writes before nor after the barrier are enclosed in a seq-writer critical section that would ensure readers are aware of ongoing writes::h]hXNote that writes surrounding the barrier should be declared atomic (e.g. via WRITE_ONCE): a) to ensure the writes become visible to other threads atomically, avoiding compiler optimizations; b) to document which writes are meant to propagate to the reader critical section. This is necessary because neither writes before nor after the barrier are enclosed in a seq-writer critical section that would ensure readers are aware of ongoing writes:}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjubj)}(hXyseqcount_t seq; bool X = true, Y = false; void read(void) { bool x, y; do { int s = read_seqcount_begin(&seq); x = X; y = Y; } while (read_seqcount_retry(&seq, s)); BUG_ON(!x && !y); } void write(void) { WRITE_ONCE(Y, true); raw_write_seqcount_barrier(seq); WRITE_ONCE(X, false); }h]hXyseqcount_t seq; bool X = true, Y = false; void read(void) { bool x, y; do { int s = read_seqcount_begin(&seq); x = X; y = Y; } while (read_seqcount_retry(&seq, s)); BUG_ON(!x && !y); } void write(void) { WRITE_ONCE(Y, true); raw_write_seqcount_barrier(seq); WRITE_ONCE(X, false); }}hjNsbah}(h]h ]h"]h$]h&]hhuh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#write_seqcount_invalidate (C macro)c.write_seqcount_invalidatehNtauh1jhjhhhNhNubj)}(hhh](j)}(hwrite_seqcount_invalidateh]j)}(hwrite_seqcount_invalidateh]j)}(hwrite_seqcount_invalidateh]j)}(hjwh]hwrite_seqcount_invalidate}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjyhhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMEubah}(h]h ]h"]h$]h&]hhjuh1jjjhjuhhhjhMEubah}(h]jpah ](jj eh"]h$]h&]j j)jhuh1jhjhMEhjrhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjrhhhjhMEubeh}(h]h ](jmacroeh"]h$]h&]j#jj$jj%jj&j'j(uh1jhhhjhNhNubh)}(h!``write_seqcount_invalidate (s)``h]jD)}(hjh]hwrite_seqcount_invalidate (s)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMGhjhhubj)}(h7invalidate in-progress seqcount_t read side operations h]h)}(h6invalidate in-progress seqcount_t read side operationsh]h6invalidate in-progress seqcount_t read side operations}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMEhjubah}(h]h ]h"]h$]h&]uh1jhjhMEhjhhubj[)}(h**Parameters** ``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants **Description** After write_seqcount_invalidate, no seqcount_t read side operations will complete successfully and see data older than this.h](h)}(h**Parameters**h]je)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMIhjubj{)}(hhh]j)}(hG``s`` Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants h](j)}(h``s``h]jD)}(hjh]hs}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMGhjubj)}(hhh]h)}(h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variantsh]h@Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMGhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMGhjubah}(h]h ]h"]h$]h&]uh1jzhjubh)}(h**Description**h]je)}(hjBh]h Description}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj@ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMIhjubh)}(h|After write_seqcount_invalidate, no seqcount_t read side operations will complete successfully and see data older than this.h]h|After write_seqcount_invalidate, no seqcount_t read side operations will complete successfully and see data older than this.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMHhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jSEQCNT_LATCH_ZERO (C macro)c.SEQCNT_LATCH_ZEROhNtauh1jhjhhhNhNubj)}(hhh](j)}(hSEQCNT_LATCH_ZEROh]j)}(hSEQCNT_LATCH_ZEROh]j)}(hSEQCNT_LATCH_ZEROh]j)}(hjh]hSEQCNT_LATCH_ZERO}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMfubah}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhMfubah}(h]jzah ](jj eh"]h$]h&]j j)jhuh1jhjhMfhj|hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj|hhhjhMfubeh}(h]h ](jmacroeh"]h$]h&]j#jj$jj%jj&j'j(uh1jhhhjhNhNubh)}(h ``SEQCNT_LATCH_ZERO (seq_name)``h]jD)}(hjh]hSEQCNT_LATCH_ZERO (seq_name)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhhjhhubj)}(h(static initializer for seqcount_latch_t h]h)}(h'static initializer for seqcount_latch_th]h'static initializer for seqcount_latch_t}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMfhjubah}(h]h ]h"]h$]h&]uh1jhjhMfhjhhubj[)}(hD**Parameters** ``seq_name`` Name of the seqcount_latch_t instanceh](h)}(h**Parameters**h]je)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMjhjubj{)}(hhh]j)}(h2``seq_name`` Name of the seqcount_latch_t instanceh](j)}(h ``seq_name``h]jD)}(hjh]hseq_name}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMlhj ubj)}(hhh]h)}(h%Name of the seqcount_latch_t instanceh]h%Name of the seqcount_latch_t instance}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMghj'ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj&hMlhjubah}(h]h ]h"]h$]h&]uh1jzhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jseqcount_latch_init (C macro)c.seqcount_latch_inithNtauh1jhjhhhNhNubj)}(hhh](j)}(hseqcount_latch_inith]j)}(hseqcount_latch_inith]j)}(hseqcount_latch_inith]j)}(hjeh]hseqcount_latch_init}(hjohhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkubah}(h]h ](jjeh"]h$]h&]hhuh1jhjghhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMnubah}(h]h ]h"]h$]h&]hhjuh1jjjhjchhhjhMnubah}(h]j^ah ](jj eh"]h$]h&]j j)jhuh1jhjhMnhj`hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj`hhhjhMnubeh}(h]h ](jmacroeh"]h$]h&]j#jj$jj%jj&j'j(uh1jhhhjhNhNubh)}(h``seqcount_latch_init (s)``h]jD)}(hjh]hseqcount_latch_init (s)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMphjhhubj)}(h)runtime initializer for seqcount_latch_t h]h)}(h(runtime initializer for seqcount_latch_th]h(runtime initializer for seqcount_latch_t}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMnhjubah}(h]h ]h"]h$]h&]uh1jhjhMnhjhhubj[)}(h@**Parameters** ``s`` Pointer to the seqcount_latch_t instanceh](h)}(h**Parameters**h]je)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMrhjubj{)}(hhh]j)}(h.``s`` Pointer to the seqcount_latch_t instanceh](j)}(h``s``h]jD)}(hjh]hs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMthjubj)}(hhh]h)}(h(Pointer to the seqcount_latch_t instanceh]h(Pointer to the seqcount_latch_t instance}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMohj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj hMthjubah}(h]h ]h"]h$]h&]uh1jzhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$raw_read_seqcount_latch (C function)c.raw_read_seqcount_latchhNtauh1jhjhhhNhNubj)}(hhh](j)}(hseq); modify(latch->data[0], ...); write_seqcount_latch(&latch->seq); modify(latch->data[1], ...); write_seqcount_latch_end(&latch->seq); } The query will have a form like:: struct entry *latch_query(struct latch_struct *latch, ...) { struct entry *entry; unsigned seq, idx; do { seq = read_seqcount_latch(&latch->seq); idx = seq & 0x01; entry = data_query(latch->data[idx], ...); // This includes needed smp_rmb() } while (read_seqcount_latch_retry(&latch->seq, seq)); return entry; } So during the modification, queries are first redirected to data[1]. Then we modify data[0]. When that is complete, we redirect queries back to data[0] and we can modify data[1]. **NOTE** The non-requirement for atomic modifications does _NOT_ include the publishing of new entries in the case where data is a dynamic data structure. An iteration might start in data[0] and get suspended long enough to miss an entire modification sequence, once it resumes it might observe the new entry. NOTE2: When data is a dynamic data structure; one should use regular RCU patterns to manage the lifetimes of the objects within.h](h)}(h**Parameters**h]je)}(hj$h]h Parameters}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj$ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj$ubj{)}(hhh]j)}(h4``seqcount_latch_t *s`` Pointer to seqcount_latch_t h](j)}(h``seqcount_latch_t *s``h]jD)}(hj$h]hseqcount_latch_t *s}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jChj$ubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj$ubj)}(hhh]h)}(hPointer to seqcount_latch_th]hPointer to seqcount_latch_t}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hMhj$ubah}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]uh1jhj$hMhj$ubah}(h]h ]h"]h$]h&]uh1jzhj$ubh)}(h**Description**h]je)}(hj$h]h Description}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj$ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj$ubh)}(hX The latch technique is a multiversion concurrency control method that allows queries during non-atomic modifications. If you can guarantee queries never interrupt the modification -- e.g. the concurrency is strictly between CPUs -- you most likely do not need this.h]hX The latch technique is a multiversion concurrency control method that allows queries during non-atomic modifications. If you can guarantee queries never interrupt the modification -- e.g. the concurrency is strictly between CPUs -- you most likely do not need this.}(hj %hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj$ubh)}(hX'Where the traditional RCU/lockless data structures rely on atomic modifications to ensure queries observe either the old or the new state the latch allows the same for non-atomic updates. The trade-off is doubling the cost of storage; we have to maintain two copies of the entire data structure.h]hX'Where the traditional RCU/lockless data structures rely on atomic modifications to ensure queries observe either the old or the new state the latch allows the same for non-atomic updates. The trade-off is doubling the cost of storage; we have to maintain two copies of the entire data structure.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj$ubh)}(hVery simply put: we first modify one copy and then the other. This ensures there is always one copy in a stable state, ready to give us an answer.h]hVery simply put: we first modify one copy and then the other. This ensures there is always one copy in a stable state, ready to give us an answer.}(hj'%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj$ubh)}(h)The basic form is a data structure like::h]h(The basic form is a data structure like:}(hj6%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj$ubj)}(hfstruct latch_struct { seqcount_latch_t seq; struct data_struct data[2]; };h]hfstruct latch_struct { seqcount_latch_t seq; struct data_struct data[2]; };}hjE%sbah}(h]h ]h"]h$]h&]hhuh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj$ubh)}(hXWhere a modification, which is assumed to be externally serialized, does the following::h]hWWhere a modification, which is assumed to be externally serialized, does the following:}(hjT%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj$ubj)}(hX void latch_modify(struct latch_struct *latch, ...) { write_seqcount_latch_begin(&latch->seq); modify(latch->data[0], ...); write_seqcount_latch(&latch->seq); modify(latch->data[1], ...); write_seqcount_latch_end(&latch->seq); }h]hX void latch_modify(struct latch_struct *latch, ...) { write_seqcount_latch_begin(&latch->seq); modify(latch->data[0], ...); write_seqcount_latch(&latch->seq); modify(latch->data[1], ...); write_seqcount_latch_end(&latch->seq); }}hjc%sbah}(h]h ]h"]h$]h&]hhuh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj$ubh)}(h!The query will have a form like::h]h The query will have a form like:}(hjr%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj$ubj)}(hXstruct entry *latch_query(struct latch_struct *latch, ...) { struct entry *entry; unsigned seq, idx; do { seq = read_seqcount_latch(&latch->seq); idx = seq & 0x01; entry = data_query(latch->data[idx], ...); // This includes needed smp_rmb() } while (read_seqcount_latch_retry(&latch->seq, seq)); return entry; }h]hXstruct entry *latch_query(struct latch_struct *latch, ...) { struct entry *entry; unsigned seq, idx; do { seq = read_seqcount_latch(&latch->seq); idx = seq & 0x01; entry = data_query(latch->data[idx], ...); // This includes needed smp_rmb() } while (read_seqcount_latch_retry(&latch->seq, seq)); return entry; }}hj%sbah}(h]h ]h"]h$]h&]hhuh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj$ubh)}(hSo during the modification, queries are first redirected to data[1]. Then we modify data[0]. When that is complete, we redirect queries back to data[0] and we can modify data[1].h]hSo during the modification, queries are first redirected to data[1]. Then we modify data[0]. When that is complete, we redirect queries back to data[0] and we can modify data[1].}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj$ubh)}(h**NOTE**h]je)}(hj%h]hNOTE}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj%ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj$ubj)}(hX.The non-requirement for atomic modifications does _NOT_ include the publishing of new entries in the case where data is a dynamic data structure. An iteration might start in data[0] and get suspended long enough to miss an entire modification sequence, once it resumes it might observe the new entry. h](h)}(hThe non-requirement for atomic modifications does _NOT_ include the publishing of new entries in the case where data is a dynamic data structure.h]hThe non-requirement for atomic modifications does _NOT_ include the publishing of new entries in the case where data is a dynamic data structure.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj%ubh)}(hAn iteration might start in data[0] and get suspended long enough to miss an entire modification sequence, once it resumes it might observe the new entry.h]hAn iteration might start in data[0] and get suspended long enough to miss an entire modification sequence, once it resumes it might observe the new entry.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj%ubeh}(h]h ]h"]h$]h&]uh1jhj%hMhj$ubh)}(hNOTE2:h]hNOTE2:}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj$ubj)}(hyWhen data is a dynamic data structure; one should use regular RCU patterns to manage the lifetimes of the objects within.h]h)}(hyWhen data is a dynamic data structure; one should use regular RCU patterns to manage the lifetimes of the objects within.h]hyWhen data is a dynamic data structure; one should use regular RCU patterns to manage the lifetimes of the objects within.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj%ubah}(h]h ]h"]h$]h&]uh1jhj&hMhj$ubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!write_seqcount_latch (C function)c.write_seqcount_latchhNtauh1jhjhhhNhNubj)}(hhh](j)}(h/void write_seqcount_latch (seqcount_latch_t *s)h]j)}(h.void write_seqcount_latch(seqcount_latch_t *s)h](jP)}(hvoidh]hvoid}(hj'&hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj#&hhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMubjb)}(h h]h }(hj6&hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj#&hhhj5&hMubj)}(hwrite_seqcount_latchh]j)}(hwrite_seqcount_latchh]hwrite_seqcount_latch}(hjH&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjD&ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj#&hhhj5&hMubj)}(h(seqcount_latch_t *s)h]j)}(hseqcount_latch_t *sh](h)}(hhh]j)}(hseqcount_latch_th]hseqcount_latch_t}(hjg&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjd&ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetji&modnameN classnameNjj)}j]j)}jjJ&sbc.write_seqcount_latchasbuh1hhj`&ubjb)}(h h]h }(hj&hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj`&ubj)}(hjh]h*}(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`&ubj)}(hjh]hs}(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`&ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj\&ubah}(h]h ]h"]h$]h&]hhuh1jhj#&hhhj5&hMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj&hhhj5&hMubah}(h]j&ah ](jj eh"]h$]h&]j j)jhuh1jhj5&hMhj&hhubj)}(hhh]h)}(h#redirect latch readers to even copyh]h#redirect latch readers to even copy}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj&hhubah}(h]h ]h"]h$]h&]uh1jhj&hhhj5&hMubeh}(h]h ](jfunctioneh"]h$]h&]j#jj$j&j%j&j&j'j(uh1jhhhjhNhNubj[)}(hE**Parameters** ``seqcount_latch_t *s`` Pointer to seqcount_latch_th](h)}(h**Parameters**h]je)}(hj&h]h Parameters}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj&ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj&ubj{)}(hhh]j)}(h3``seqcount_latch_t *s`` Pointer to seqcount_latch_th](j)}(h``seqcount_latch_t *s``h]jD)}(hj 'h]hseqcount_latch_t *s}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jChj 'ubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj'ubj)}(hhh]h)}(hPointer to seqcount_latch_th]hPointer to seqcount_latch_t}(hj%'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj"'ubah}(h]h ]h"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]uh1jhj!'hMhj'ubah}(h]h ]h"]h$]h&]uh1jzhj&ubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j%write_seqcount_latch_end (C function)c.write_seqcount_latch_endhNtauh1jhjhhhNhNubj)}(hhh](j)}(h3void write_seqcount_latch_end (seqcount_latch_t *s)h]j)}(h2void write_seqcount_latch_end(seqcount_latch_t *s)h](jP)}(hvoidh]hvoid}(hjf'hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjb'hhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMubjb)}(h h]h }(hju'hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjb'hhhjt'hMubj)}(hwrite_seqcount_latch_endh]j)}(hwrite_seqcount_latch_endh]hwrite_seqcount_latch_end}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjb'hhhjt'hMubj)}(h(seqcount_latch_t *s)h]j)}(hseqcount_latch_t *sh](h)}(hhh]j)}(hseqcount_latch_th]hseqcount_latch_t}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj'modnameN classnameNjj)}j]j)}jj'sbc.write_seqcount_latch_endasbuh1hhj'ubjb)}(h h]h }(hj'hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj'ubj)}(hjh]h*}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubj)}(hjh]hs}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj'ubah}(h]h ]h"]h$]h&]hhuh1jhjb'hhhjt'hMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj^'hhhjt'hMubah}(h]jY'ah ](jj eh"]h$]h&]j j)jhuh1jhjt'hMhj['hhubj)}(hhh]h)}(h$end a seqcount_latch_t write sectionh]h$end a seqcount_latch_t write section}(hj (hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj(hhubah}(h]h ]h"]h$]h&]uh1jhj['hhhjt'hMubeh}(h]h ](jfunctioneh"]h$]h&]j#jj$j"(j%j"(j&j'j(uh1jhhhjhNhNubj[)}(h**Parameters** ``seqcount_latch_t *s`` Pointer to seqcount_latch_t **Description** Marks the end of a seqcount_latch_t writer section, after all copies of the latch-protected data have been updated.h](h)}(h**Parameters**h]je)}(hj,(h]h Parameters}(hj.(hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj*(ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj&(ubj{)}(hhh]j)}(h4``seqcount_latch_t *s`` Pointer to seqcount_latch_t h](j)}(h``seqcount_latch_t *s``h]jD)}(hjK(h]hseqcount_latch_t *s}(hjM(hhhNhNubah}(h]h ]h"]h$]h&]uh1jChjI(ubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjE(ubj)}(hhh]h)}(hPointer to seqcount_latch_th]hPointer to seqcount_latch_t}(hjd(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`(hMhja(ubah}(h]h ]h"]h$]h&]uh1jhjE(ubeh}(h]h ]h"]h$]h&]uh1jhj`(hMhjB(ubah}(h]h ]h"]h$]h&]uh1jzhj&(ubh)}(h**Description**h]je)}(hj(h]h Description}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj(ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj&(ubh)}(hsMarks the end of a seqcount_latch_t writer section, after all copies of the latch-protected data have been updated.h]hsMarks the end of a seqcount_latch_t writer section, after all copies of the latch-protected data have been updated.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj&(ubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jseqlock_init (C macro)c.seqlock_inithNtauh1jhjhhhNhNubj)}(hhh](j)}(h seqlock_inith]j)}(h seqlock_inith]j)}(h seqlock_inith]j)}(hj(h]h seqlock_init}(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj(hhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM,ubah}(h]h ]h"]h$]h&]hhjuh1jjjhj(hhhj(hM,ubah}(h]j(ah ](jj eh"]h$]h&]j j)jhuh1jhj(hM,hj(hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj(hhhj(hM,ubeh}(h]h ](jmacroeh"]h$]h&]j#jj$j(j%j(j&j'j(uh1jhhhjhNhNubh)}(h``seqlock_init (sl)``h]jD)}(hj)h]hseqlock_init (sl)}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jChj(ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM.hjhhubj)}(h"dynamic initializer for seqlock_t h]h)}(h!dynamic initializer for seqlock_th]h!dynamic initializer for seqlock_t}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM,hj)ubah}(h]h ]h"]h$]h&]uh1jhj))hM,hjhhubj[)}(h:**Parameters** ``sl`` Pointer to the seqlock_t instanceh](h)}(h**Parameters**h]je)}(hj6)h]h Parameters}(hj8)hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj4)ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM0hj0)ubj{)}(hhh]j)}(h(``sl`` Pointer to the seqlock_t instanceh](j)}(h``sl``h]jD)}(hjU)h]hsl}(hjW)hhhNhNubah}(h]h ]h"]h$]h&]uh1jChjS)ubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM2hjO)ubj)}(hhh]h)}(h!Pointer to the seqlock_t instanceh]h!Pointer to the seqlock_t instance}(hjn)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM-hjk)ubah}(h]h ]h"]h$]h&]uh1jhjO)ubeh}(h]h ]h"]h$]h&]uh1jhjj)hM2hjL)ubah}(h]h ]h"]h$]h&]uh1jzhj0)ubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jDEFINE_SEQLOCK (C macro)c.DEFINE_SEQLOCKhNtauh1jhjhhhNhNubj)}(hhh](j)}(hDEFINE_SEQLOCKh]j)}(hDEFINE_SEQLOCKh]j)}(hDEFINE_SEQLOCKh]j)}(hj)h]hDEFINE_SEQLOCK}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj)hhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM6ubah}(h]h ]h"]h$]h&]hhjuh1jjjhj)hhhj)hM6ubah}(h]j)ah ](jj eh"]h$]h&]j j)jhuh1jhj)hM6hj)hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj)hhhj)hM6ubeh}(h]h ](jmacroeh"]h$]h&]j#jj$j)j%j)j&j'j(uh1jhhhjhNhNubh)}(h``DEFINE_SEQLOCK (sl)``h]jD)}(hj)h]hDEFINE_SEQLOCK (sl)}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jChj)ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM8hjhhubj)}(h(Define a statically allocated seqlock_t h]h)}(h'Define a statically allocated seqlock_th]h'Define a statically allocated seqlock_t}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM6hj)ubah}(h]h ]h"]h$]h&]uh1jhj *hM6hjhhubj[)}(h7**Parameters** ``sl`` Name of the seqlock_t instanceh](h)}(h**Parameters**h]je)}(hj*h]h Parameters}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj*ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM:hj*ubj{)}(hhh]j)}(h%``sl`` Name of the seqlock_t instanceh](j)}(h``sl``h]jD)}(hj9*h]hsl}(hj;*hhhNhNubah}(h]h ]h"]h$]h&]uh1jChj7*ubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM<hj3*ubj)}(hhh]h)}(hName of the seqlock_t instanceh]hName of the seqlock_t instance}(hjR*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM7hjO*ubah}(h]h ]h"]h$]h&]uh1jhj3*ubeh}(h]h ]h"]h$]h&]uh1jhjN*hM<hj0*ubah}(h]h ]h"]h$]h&]uh1jzhj*ubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jread_seqbegin (C function)c.read_seqbeginhNtauh1jhjhhhNhNubj)}(hhh](j)}(h,unsigned read_seqbegin (const seqlock_t *sl)h]j)}(h+unsigned read_seqbegin(const seqlock_t *sl)h](jP)}(hunsignedh]hunsigned}(hj*hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj*hhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM=ubjb)}(h h]h }(hj*hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj*hhhj*hM=ubj)}(h read_seqbeginh]j)}(h read_seqbeginh]h read_seqbegin}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj*hhhj*hM=ubj)}(h(const seqlock_t *sl)h]j)}(hconst seqlock_t *slh](j)}(hjh]hconst}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubjb)}(h h]h }(hj*hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj*ubh)}(hhh]j)}(h seqlock_th]h seqlock_t}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj*modnameN classnameNjj)}j]j)}jj*sbc.read_seqbeginasbuh1hhj*ubjb)}(h h]h }(hj+hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj*ubj)}(hjh]h*}(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubj)}(hslh]hsl}(hj)+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj*ubah}(h]h ]h"]h$]h&]hhuh1jhj*hhhj*hM=ubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj*hhhj*hM=ubah}(h]j*ah ](jj eh"]h$]h&]j j)jhuh1jhj*hM=hj*hhubj)}(hhh]h)}(h,start a seqlock_t read side critical sectionh]h,start a seqlock_t read side critical section}(hjS+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM=hjP+hhubah}(h]h ]h"]h$]h&]uh1jhj*hhhj*hM=ubeh}(h]h ](jfunctioneh"]h$]h&]j#jj$jk+j%jk+j&j'j(uh1jhhhjhNhNubj[)}(hr**Parameters** ``const seqlock_t *sl`` Pointer to seqlock_t **Return** count, to be passed to read_seqretry()h](h)}(h**Parameters**h]je)}(hju+h]h Parameters}(hjw+hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjs+ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMAhjo+ubj{)}(hhh]j)}(h-``const seqlock_t *sl`` Pointer to seqlock_t h](j)}(h``const seqlock_t *sl``h]jD)}(hj+h]hconst seqlock_t *sl}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jChj+ubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM>hj+ubj)}(hhh]h)}(hPointer to seqlock_th]hPointer to seqlock_t}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+hM>hj+ubah}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]uh1jhj+hM>hj+ubah}(h]h ]h"]h$]h&]uh1jzhjo+ubh)}(h **Return**h]je)}(hj+h]hReturn}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj+ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM@hjo+ubh)}(h&count, to be passed to read_seqretry()h]h&count, to be passed to read_seqretry()}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM@hjo+ubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jread_seqretry (C function)c.read_seqretryhNtauh1jhjhhhNhNubj)}(hhh](j)}(h1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:1ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj1hhhj+1hM~ubj)}(h(seqlock_t *sl)h]j)}(h seqlock_t *slh](h)}(hhh]j)}(h seqlock_th]h seqlock_t}(hj]1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZ1ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj_1modnameN classnameNjj)}j]j)}jj@1sbc.write_seqlock_bhasbuh1hhjV1ubjb)}(h h]h }(hj}1hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjV1ubj)}(hjh]h*}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjV1ubj)}(hslh]hsl}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjV1ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjR1ubah}(h]h ]h"]h$]h&]hhuh1jhj1hhhj+1hM~ubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj1hhhj+1hM~ubah}(h]j1ah ](jj eh"]h$]h&]j j)jhuh1jhj+1hM~hj1hhubj)}(hhh]h)}(h1start a softirqs-disabled seqlock_t write sectionh]h1start a softirqs-disabled seqlock_t write section}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM~hj1hhubah}(h]h ]h"]h$]h&]uh1jhj1hhhj+1hM~ubeh}(h]h ](jfunctioneh"]h$]h&]j#jj$j1j%j1j&j'j(uh1jhhhjhNhNubj[)}(h**Parameters** ``seqlock_t *sl`` Pointer to seqlock_t **Description** _bh variant of write_seqlock(). Use only if the read side section, or other write side sections, can be invoked from softirq contexts.h](h)}(h**Parameters**h]je)}(hj1h]h Parameters}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj1ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj1ubj{)}(hhh]j)}(h'``seqlock_t *sl`` Pointer to seqlock_t h](j)}(h``seqlock_t *sl``h]jD)}(hj2h]h seqlock_t *sl}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jChj2ubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj1ubj)}(hhh]h)}(hPointer to seqlock_th]hPointer to seqlock_t}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2hMhj2ubah}(h]h ]h"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]uh1jhj2hMhj1ubah}(h]h ]h"]h$]h&]uh1jzhj1ubh)}(h**Description**h]je)}(hj>2h]h Description}(hj@2hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj<2ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj1ubh)}(h_bh variant of write_seqlock(). Use only if the read side section, or other write side sections, can be invoked from softirq contexts.h]h_bh variant of write_seqlock(). Use only if the read side section, or other write side sections, can be invoked from softirq contexts.}(hjT2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj1ubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jwrite_sequnlock_bh (C function)c.write_sequnlock_bhhNtauh1jhjhhhNhNubj)}(hhh](j)}(h'void write_sequnlock_bh (seqlock_t *sl)h]j)}(h&void write_sequnlock_bh(seqlock_t *sl)h](jP)}(hvoidh]hvoid}(hj2hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj2hhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMubjb)}(h h]h }(hj2hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj2hhhj2hMubj)}(hwrite_sequnlock_bhh]j)}(hwrite_sequnlock_bhh]hwrite_sequnlock_bh}(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj2hhhj2hMubj)}(h(seqlock_t *sl)h]j)}(h seqlock_t *slh](h)}(hhh]j)}(h seqlock_th]h seqlock_t}(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj2modnameN classnameNjj)}j]j)}jj2sbc.write_sequnlock_bhasbuh1hhj2ubjb)}(h h]h }(hj2hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj2ubj)}(hjh]h*}(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2ubj)}(hslh]hsl}(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj2ubah}(h]h ]h"]h$]h&]hhuh1jhj2hhhj2hMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj{2hhhj2hMubah}(h]jv2ah ](jj eh"]h$]h&]j j)jhuh1jhj2hMhjx2hhubj)}(hhh]h)}(h/end a softirqs-disabled seqlock_t write sectionh]h/end a softirqs-disabled seqlock_t write section}(hj(3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj%3hhubah}(h]h ]h"]h$]h&]uh1jhjx2hhhj2hMubeh}(h]h ](jfunctioneh"]h$]h&]j#jj$j@3j%j@3j&j'j(uh1jhhhjhNhNubj[)}(h**Parameters** ``seqlock_t *sl`` Pointer to seqlock_t **Description** write_sequnlock_bh closes the serialized, non-preemptible, and softirqs-disabled, seqlock_t write side critical section opened with write_seqlock_bh().h](h)}(h**Parameters**h]je)}(hjJ3h]h Parameters}(hjL3hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjH3ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjD3ubj{)}(hhh]j)}(h'``seqlock_t *sl`` Pointer to seqlock_t h](j)}(h``seqlock_t *sl``h]jD)}(hji3h]h seqlock_t *sl}(hjk3hhhNhNubah}(h]h ]h"]h$]h&]uh1jChjg3ubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjc3ubj)}(hhh]h)}(hPointer to seqlock_th]hPointer to seqlock_t}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~3hMhj3ubah}(h]h ]h"]h$]h&]uh1jhjc3ubeh}(h]h ]h"]h$]h&]uh1jhj~3hMhj`3ubah}(h]h ]h"]h$]h&]uh1jzhjD3ubh)}(h**Description**h]je)}(hj3h]h Description}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj3ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjD3ubh)}(hwrite_sequnlock_bh closes the serialized, non-preemptible, and softirqs-disabled, seqlock_t write side critical section opened with write_seqlock_bh().h]hwrite_sequnlock_bh closes the serialized, non-preemptible, and softirqs-disabled, seqlock_t write side critical section opened with write_seqlock_bh().}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjD3ubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jwrite_seqlock_irq (C function)c.write_seqlock_irqhNtauh1jhjhhhNhNubj)}(hhh](j)}(h&void write_seqlock_irq (seqlock_t *sl)h]j)}(h%void write_seqlock_irq(seqlock_t *sl)h](jP)}(hvoidh]hvoid}(hj3hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj3hhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMubjb)}(h h]h }(hj3hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj3hhhj3hMubj)}(hwrite_seqlock_irqh]j)}(hwrite_seqlock_irqh]hwrite_seqlock_irq}(hj 4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj3hhhj3hMubj)}(h(seqlock_t *sl)h]j)}(h seqlock_t *slh](h)}(hhh]j)}(h seqlock_th]h seqlock_t}(hj)4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&4ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj+4modnameN classnameNjj)}j]j)}jj 4sbc.write_seqlock_irqasbuh1hhj"4ubjb)}(h h]h }(hjI4hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj"4ubj)}(hjh]h*}(hjW4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"4ubj)}(hslh]hsl}(hjd4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"4ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj4ubah}(h]h ]h"]h$]h&]hhuh1jhj3hhhj3hMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj3hhhj3hMubah}(h]j3ah ](jj eh"]h$]h&]j j)jhuh1jhj3hMhj3hhubj)}(hhh]h)}(h1start a non-interruptible seqlock_t write sectionh]h1start a non-interruptible seqlock_t write section}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj4hhubah}(h]h ]h"]h$]h&]uh1jhj3hhhj3hMubeh}(h]h ](jfunctioneh"]h$]h&]j#jj$j4j%j4j&j'j(uh1jhhhjhNhNubj[)}(h**Parameters** ``seqlock_t *sl`` Pointer to seqlock_t **Description** _irq variant of write_seqlock(). Use only if the read side section, or other write sections, can be invoked from hardirq contexts.h](h)}(h**Parameters**h]je)}(hj4h]h Parameters}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj4ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj4ubj{)}(hhh]j)}(h'``seqlock_t *sl`` Pointer to seqlock_t h](j)}(h``seqlock_t *sl``h]jD)}(hj4h]h seqlock_t *sl}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jChj4ubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj4ubj)}(hhh]h)}(hPointer to seqlock_th]hPointer to seqlock_t}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4hMhj4ubah}(h]h ]h"]h$]h&]uh1jhj4ubeh}(h]h ]h"]h$]h&]uh1jhj4hMhj4ubah}(h]h ]h"]h$]h&]uh1jzhj4ubh)}(h**Description**h]je)}(hj 5h]h Description}(hj 5hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj5ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj4ubh)}(h_irq variant of write_seqlock(). Use only if the read side section, or other write sections, can be invoked from hardirq contexts.h]h_irq variant of write_seqlock(). Use only if the read side section, or other write sections, can be invoked from hardirq contexts.}(hj 5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj4ubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j write_sequnlock_irq (C function)c.write_sequnlock_irqhNtauh1jhjhhhNhNubj)}(hhh](j)}(h(void write_sequnlock_irq (seqlock_t *sl)h]j)}(h'void write_sequnlock_irq(seqlock_t *sl)h](jP)}(hvoidh]hvoid}(hjO5hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjK5hhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMubjb)}(h h]h }(hj^5hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjK5hhhj]5hMubj)}(hwrite_sequnlock_irqh]j)}(hwrite_sequnlock_irqh]hwrite_sequnlock_irq}(hjp5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjl5ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjK5hhhj]5hMubj)}(h(seqlock_t *sl)h]j)}(h seqlock_t *slh](h)}(hhh]j)}(h seqlock_th]h seqlock_t}(hj5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj5modnameN classnameNjj)}j]j)}jjr5sbc.write_sequnlock_irqasbuh1hhj5ubjb)}(h h]h }(hj5hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj5ubj)}(hjh]h*}(hj5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubj)}(hslh]hsl}(hj5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj5ubah}(h]h ]h"]h$]h&]hhuh1jhjK5hhhj]5hMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjG5hhhj]5hMubah}(h]jB5ah ](jj eh"]h$]h&]j j)jhuh1jhj]5hMhjD5hhubj)}(hhh]h)}(h/end a non-interruptible seqlock_t write sectionh]h/end a non-interruptible seqlock_t write section}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj5hhubah}(h]h ]h"]h$]h&]uh1jhjD5hhhj]5hMubeh}(h]h ](jfunctioneh"]h$]h&]j#jj$j 6j%j 6j&j'j(uh1jhhhjhNhNubj[)}(h**Parameters** ``seqlock_t *sl`` Pointer to seqlock_t **Description** write_sequnlock_irq closes the serialized and non-interruptible seqlock_t write side section opened with write_seqlock_irq().h](h)}(h**Parameters**h]je)}(hj6h]h Parameters}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj6ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj6ubj{)}(hhh]j)}(h'``seqlock_t *sl`` Pointer to seqlock_t h](j)}(h``seqlock_t *sl``h]jD)}(hj56h]h seqlock_t *sl}(hj76hhhNhNubah}(h]h ]h"]h$]h&]uh1jChj36ubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj/6ubj)}(hhh]h)}(hPointer to seqlock_th]hPointer to seqlock_t}(hjN6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJ6hMhjK6ubah}(h]h ]h"]h$]h&]uh1jhj/6ubeh}(h]h ]h"]h$]h&]uh1jhjJ6hMhj,6ubah}(h]h ]h"]h$]h&]uh1jzhj6ubh)}(h**Description**h]je)}(hjp6h]h Description}(hjr6hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjn6ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj6ubh)}(h}write_sequnlock_irq closes the serialized and non-interruptible seqlock_t write side section opened with write_seqlock_irq().h]h}write_sequnlock_irq closes the serialized and non-interruptible seqlock_t write side section opened with write_seqlock_irq().}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj6ubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jwrite_seqlock_irqsave (C macro)c.write_seqlock_irqsavehNtauh1jhjhhhNhNubj)}(hhh](j)}(hwrite_seqlock_irqsaveh]j)}(hwrite_seqlock_irqsaveh]j)}(hwrite_seqlock_irqsaveh]j)}(hj6h]hwrite_seqlock_irqsave}(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj6hhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMubah}(h]h ]h"]h$]h&]hhjuh1jjjhj6hhhj6hMubah}(h]j6ah ](jj eh"]h$]h&]j j)jhuh1jhj6hMhj6hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj6hhhj6hMubeh}(h]h ](jmacroeh"]h$]h&]j#jj$j6j%j6j&j'j(uh1jhhhjhNhNubh)}(h'``write_seqlock_irqsave (lock, flags)``h]jD)}(hj6h]h#write_seqlock_irqsave (lock, flags)}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jChj6ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjhhubj)}(h2start a non-interruptible seqlock_t write section h]h)}(h1start a non-interruptible seqlock_t write sectionh]h1start a non-interruptible seqlock_t write section}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj7ubah}(h]h ]h"]h$]h&]uh1jhj7hMhjhhubj[)}(hXJ**Parameters** ``lock`` Pointer to seqlock_t ``flags`` Stack-allocated storage for saving caller's local interrupt state, to be passed to write_sequnlock_irqrestore(). **Description** _irqsave variant of write_seqlock(). Use it only if the read side section, or other write sections, can be invoked from hardirq context.h](h)}(h**Parameters**h]je)}(hj 7h]h Parameters}(hj"7hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj7ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj7ubj{)}(hhh](j)}(h``lock`` Pointer to seqlock_t h](j)}(h``lock``h]jD)}(hj?7h]hlock}(hjA7hhhNhNubah}(h]h ]h"]h$]h&]uh1jChj=7ubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj97ubj)}(hhh]h)}(hPointer to seqlock_th]hPointer to seqlock_t}(hjX7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjT7hMhjU7ubah}(h]h ]h"]h$]h&]uh1jhj97ubeh}(h]h ]h"]h$]h&]uh1jhjT7hMhj67ubj)}(h{``flags`` Stack-allocated storage for saving caller's local interrupt state, to be passed to write_sequnlock_irqrestore(). h](j)}(h ``flags``h]jD)}(hjx7h]hflags}(hjz7hhhNhNubah}(h]h ]h"]h$]h&]uh1jChjv7ubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjr7ubj)}(hhh]h)}(hpStack-allocated storage for saving caller's local interrupt state, to be passed to write_sequnlock_irqrestore().h]hrStack-allocated storage for saving caller’s local interrupt state, to be passed to write_sequnlock_irqrestore().}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj7ubah}(h]h ]h"]h$]h&]uh1jhjr7ubeh}(h]h ]h"]h$]h&]uh1jhj7hMhj67ubeh}(h]h ]h"]h$]h&]uh1jzhj7ubh)}(h**Description**h]je)}(hj7h]h Description}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj7ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj7ubh)}(h_irqsave variant of write_seqlock(). Use it only if the read side section, or other write sections, can be invoked from hardirq context.h]h_irqsave variant of write_seqlock(). Use it only if the read side section, or other write sections, can be invoked from hardirq context.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj7ubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j'write_sequnlock_irqrestore (C function)c.write_sequnlock_irqrestorehNtauh1jhjhhhNhNubj)}(hhh](j)}(hDvoid write_sequnlock_irqrestore (seqlock_t *sl, unsigned long flags)h]j)}(hCvoid write_sequnlock_irqrestore(seqlock_t *sl, unsigned long flags)h](jP)}(hvoidh]hvoid}(hj7hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj7hhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMubjb)}(h h]h }(hj8hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj7hhhj8hMubj)}(hwrite_sequnlock_irqrestoreh]j)}(hwrite_sequnlock_irqrestoreh]hwrite_sequnlock_irqrestore}(hj8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj7hhhj8hMubj)}(h$(seqlock_t *sl, unsigned long flags)h](j)}(h seqlock_t *slh](h)}(hhh]j)}(h seqlock_th]h seqlock_t}(hj98hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj68ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj;8modnameN classnameNjj)}j]j)}jj8sbc.write_sequnlock_irqrestoreasbuh1hhj28ubjb)}(h h]h }(hjY8hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj28ubj)}(hjh]h*}(hjg8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj28ubj)}(hslh]hsl}(hjt8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj28ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj.8ubj)}(hunsigned long flagsh](jP)}(hunsignedh]hunsigned}(hj8hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj8ubjb)}(h h]h }(hj8hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj8ubjP)}(hlongh]hlong}(hj8hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj8ubjb)}(h h]h }(hj8hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj8ubj)}(hflagsh]hflags}(hj8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj.8ubeh}(h]h ]h"]h$]h&]hhuh1jhj7hhhj8hMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj7hhhj8hMubah}(h]j7ah ](jj eh"]h$]h&]j j)jhuh1jhj8hMhj7hhubj)}(hhh]h)}(h-end non-interruptible seqlock_t write sectionh]h-end non-interruptible seqlock_t write section}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj8hhubah}(h]h ]h"]h$]h&]uh1jhj7hhhj8hMubeh}(h]h ](jfunctioneh"]h$]h&]j#jj$j9j%j9j&j'j(uh1jhhhjhNhNubj[)}(hX1**Parameters** ``seqlock_t *sl`` Pointer to seqlock_t ``unsigned long flags`` Caller's saved interrupt state, from write_seqlock_irqsave() **Description** write_sequnlock_irqrestore closes the serialized and non-interruptible seqlock_t write section previously opened with write_seqlock_irqsave().h](h)}(h**Parameters**h]je)}(hj9h]h Parameters}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj9ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj 9ubj{)}(hhh](j)}(h'``seqlock_t *sl`` Pointer to seqlock_t h](j)}(h``seqlock_t *sl``h]jD)}(hj09h]h seqlock_t *sl}(hj29hhhNhNubah}(h]h ]h"]h$]h&]uh1jChj.9ubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj*9ubj)}(hhh]h)}(hPointer to seqlock_th]hPointer to seqlock_t}(hjI9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjE9hMhjF9ubah}(h]h ]h"]h$]h&]uh1jhj*9ubeh}(h]h ]h"]h$]h&]uh1jhjE9hMhj'9ubj)}(hU``unsigned long flags`` Caller's saved interrupt state, from write_seqlock_irqsave() h](j)}(h``unsigned long flags``h]jD)}(hji9h]hunsigned long flags}(hjk9hhhNhNubah}(h]h ]h"]h$]h&]uh1jChjg9ubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjc9ubj)}(hhh]h)}(hCaller’s saved interrupt state, from write_seqlock_irqsave()}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~9hMhj9ubah}(h]h ]h"]h$]h&]uh1jhjc9ubeh}(h]h ]h"]h$]h&]uh1jhj~9hMhj'9ubeh}(h]h ]h"]h$]h&]uh1jzhj 9ubh)}(h**Description**h]je)}(hj9h]h Description}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj9ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj 9ubh)}(hwrite_sequnlock_irqrestore closes the serialized and non-interruptible seqlock_t write section previously opened with write_seqlock_irqsave().h]hwrite_sequnlock_irqrestore closes the serialized and non-interruptible seqlock_t write section previously opened with write_seqlock_irqsave().}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj 9ubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jread_seqlock_excl (C function)c.read_seqlock_exclhNtauh1jhjhhhNhNubj)}(hhh](j)}(h&void read_seqlock_excl (seqlock_t *sl)h]j)}(h%void read_seqlock_excl(seqlock_t *sl)h](jP)}(hvoidh]hvoid}(hj9hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj9hhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMubjb)}(h h]h }(hj9hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj9hhhj9hMubj)}(hread_seqlock_exclh]j)}(hread_seqlock_exclh]hread_seqlock_excl}(hj :hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj9hhhj9hMubj)}(h(seqlock_t *sl)h]j)}(h seqlock_t *slh](h)}(hhh]j)}(h seqlock_th]h seqlock_t}(hj):hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&:ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj+:modnameN classnameNjj)}j]j)}jj :sbc.read_seqlock_exclasbuh1hhj":ubjb)}(h h]h }(hjI:hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj":ubj)}(hjh]h*}(hjW:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj":ubj)}(hslh]hsl}(hjd:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj":ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj:ubah}(h]h ]h"]h$]h&]hhuh1jhj9hhhj9hMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj9hhhj9hMubah}(h]j9ah ](jj eh"]h$]h&]j j)jhuh1jhj9hMhj9hhubj)}(hhh]h)}(h(begin a seqlock_t locking reader sectionh]h(begin a seqlock_t locking reader section}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj:hhubah}(h]h ]h"]h$]h&]uh1jhj9hhhj9hMubeh}(h]h ](jfunctioneh"]h$]h&]j#jj$j:j%j:j&j'j(uh1jhhhjhNhNubj[)}(hXT**Parameters** ``seqlock_t *sl`` Pointer to seqlock_t **Description** read_seqlock_excl opens a seqlock_t locking reader critical section. A locking reader exclusively locks out *both* other writers *and* other locking readers, but it does not update the embedded sequence number. Locking readers act like a normal spin_lock()/spin_unlock(). The opened read section must be closed with read_sequnlock_excl(). **Context** if the seqlock_t write section, *or other read sections*, can be invoked from hardirq or softirq contexts, use the _irqsave or _bh variant of this function instead.h](h)}(h**Parameters**h]je)}(hj:h]h Parameters}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj:ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj:ubj{)}(hhh]j)}(h'``seqlock_t *sl`` Pointer to seqlock_t h](j)}(h``seqlock_t *sl``h]jD)}(hj:h]h seqlock_t *sl}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jChj:ubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj:ubj)}(hhh]h)}(hPointer to seqlock_th]hPointer to seqlock_t}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:hMhj:ubah}(h]h ]h"]h$]h&]uh1jhj:ubeh}(h]h ]h"]h$]h&]uh1jhj:hMhj:ubah}(h]h ]h"]h$]h&]uh1jzhj:ubh)}(h**Description**h]je)}(hj ;h]h Description}(hj ;hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj;ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj:ubh)}(hread_seqlock_excl opens a seqlock_t locking reader critical section. A locking reader exclusively locks out *both* other writers *and* other locking readers, but it does not update the embedded sequence number.h](hmread_seqlock_excl opens a seqlock_t locking reader critical section. A locking reader exclusively locks out }(hj ;hhhNhNubhemphasis)}(h*both*h]hboth}(hj*;hhhNhNubah}(h]h ]h"]h$]h&]uh1j(;hj ;ubh other writers }(hj ;hhhNhNubj);)}(h*and*h]hand}(hj<;hhhNhNubah}(h]h ]h"]h$]h&]uh1j(;hj ;ubhL other locking readers, but it does not update the embedded sequence number.}(hj ;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj:ubh)}(hhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hMhj>ubah}(h]h ]h"]h$]h&]uh1jhj=ubeh}(h]h ]h"]h$]h&]uh1jhj>hMhj=ubah}(h]h ]h"]h$]h&]uh1jzhj=ubh)}(h**Description**h]je)}(hj->h]h Description}(hj/>hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj+>ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj=ubh)}(h_bh variant of read_seqlock_excl(). Use this variant only if the seqlock_t write side section, *or other read sections*, can be invoked from softirq contexts.h](h__bh variant of read_seqlock_excl(). Use this variant only if the seqlock_t write side section, }(hjC>hhhNhNubj);)}(h*or other read sections*h]hor other read sections}(hjK>hhhNhNubah}(h]h ]h"]h$]h&]uh1j(;hjC>ubh', can be invoked from softirq contexts.}(hjC>hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj=ubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#read_sequnlock_excl_bh (C function)c.read_sequnlock_excl_bhhNtauh1jhjhhhNhNubj)}(hhh](j)}(h+void read_sequnlock_excl_bh (seqlock_t *sl)h]j)}(h*void read_sequnlock_excl_bh(seqlock_t *sl)h](jP)}(hvoidh]hvoid}(hj>hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj>hhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMubjb)}(h h]h }(hj>hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj>hhhj>hMubj)}(hread_sequnlock_excl_bhh]j)}(hread_sequnlock_excl_bhh]hread_sequnlock_excl_bh}(hj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj>hhhj>hMubj)}(h(seqlock_t *sl)h]j)}(h seqlock_t *slh](h)}(hhh]j)}(h seqlock_th]h seqlock_t}(hj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj>modnameN classnameNjj)}j]j)}jj>sbc.read_sequnlock_excl_bhasbuh1hhj>ubjb)}(h h]h }(hj>hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj>ubj)}(hjh]h*}(hj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>ubj)}(hslh]hsl}(hj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj>ubah}(h]h ]h"]h$]h&]hhuh1jhj>hhhj>hMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj|>hhhj>hMubah}(h]jw>ah ](jj eh"]h$]h&]j j)jhuh1jhj>hMhjy>hhubj)}(hhh]h)}(h8stop a seqlock_t softirq-disabled locking reader sectionh]h8stop a seqlock_t softirq-disabled locking reader section}(hj)?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj&?hhubah}(h]h ]h"]h$]h&]uh1jhjy>hhhj>hMubeh}(h]h ](jfunctioneh"]h$]h&]j#jj$jA?j%jA?j&j'j(uh1jhhhjhNhNubj[)}(h8**Parameters** ``seqlock_t *sl`` Pointer to seqlock_th](h)}(h**Parameters**h]je)}(hjK?h]h Parameters}(hjM?hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjI?ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM hjE?ubj{)}(hhh]j)}(h&``seqlock_t *sl`` Pointer to seqlock_th](j)}(h``seqlock_t *sl``h]jD)}(hjj?h]h seqlock_t *sl}(hjl?hhhNhNubah}(h]h ]h"]h$]h&]uh1jChjh?ubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM hjd?ubj)}(hhh]h)}(hPointer to seqlock_th]hPointer to seqlock_t}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj?ubah}(h]h ]h"]h$]h&]uh1jhjd?ubeh}(h]h ]h"]h$]h&]uh1jhj?hM hja?ubah}(h]h ]h"]h$]h&]uh1jzhjE?ubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"read_seqlock_excl_irq (C function)c.read_seqlock_excl_irqhNtauh1jhjhhhNhNubj)}(hhh](j)}(h*void read_seqlock_excl_irq (seqlock_t *sl)h]j)}(h)void read_seqlock_excl_irq(seqlock_t *sl)h](jP)}(hvoidh]hvoid}(hj?hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj?hhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMubjb)}(h h]h }(hj?hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj?hhhj?hMubj)}(hread_seqlock_excl_irqh]j)}(hread_seqlock_excl_irqh]hread_seqlock_excl_irq}(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj?hhhj?hMubj)}(h(seqlock_t *sl)h]j)}(h seqlock_t *slh](h)}(hhh]j)}(h seqlock_th]h seqlock_t}(hj@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj@modnameN classnameNjj)}j]j)}jj?sbc.read_seqlock_excl_irqasbuh1hhj?ubjb)}(h h]h }(hj$@hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj?ubj)}(hjh]h*}(hj2@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubj)}(hslh]hsl}(hj?@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj?ubah}(h]h ]h"]h$]h&]hhuh1jhj?hhhj?hMubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj?hhhj?hMubah}(h]j?ah ](jj eh"]h$]h&]j j)jhuh1jhj?hMhj?hhubj)}(hhh]h)}(h:start a non-interruptible seqlock_t locking reader sectionh]h:start a non-interruptible seqlock_t locking reader section}(hji@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhjf@hhubah}(h]h ]h"]h$]h&]uh1jhj?hhhj?hMubeh}(h]h ](jfunctioneh"]h$]h&]j#jj$j@j%j@j&j'j(uh1jhhhjhNhNubj[)}(h**Parameters** ``seqlock_t *sl`` Pointer to seqlock_t **Description** _irq variant of read_seqlock_excl(). Use this only if the seqlock_t write side section, *or other read sections*, can be invoked from a hardirq context.h](h)}(h**Parameters**h]je)}(hj@h]h Parameters}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj@ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj@ubj{)}(hhh]j)}(h'``seqlock_t *sl`` Pointer to seqlock_t h](j)}(h``seqlock_t *sl``h]jD)}(hj@h]h seqlock_t *sl}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jChj@ubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj@ubj)}(hhh]h)}(hPointer to seqlock_th]hPointer to seqlock_t}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hMhj@ubah}(h]h ]h"]h$]h&]uh1jhj@ubeh}(h]h ]h"]h$]h&]uh1jhj@hMhj@ubah}(h]h ]h"]h$]h&]uh1jzhj@ubh)}(h**Description**h]je)}(hj@h]h Description}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jdhj@ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj@ubh)}(h_irq variant of read_seqlock_excl(). Use this only if the seqlock_t write side section, *or other read sections*, can be invoked from a hardirq context.h](hX_irq variant of read_seqlock_excl(). Use this only if the seqlock_t write side section, }(hj@hhhNhNubj);)}(h*or other read sections*h]hor other read sections}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j(;hj@ubh(, can be invoked from a hardirq context.}(hj@hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMhj@ubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$read_sequnlock_excl_irq (C function)c.read_sequnlock_excl_irqhNtauh1jhjhhhNhNubj)}(hhh](j)}(h,void read_sequnlock_excl_irq (seqlock_t *sl)h]j)}(h+void read_sequnlock_excl_irq(seqlock_t *sl)h](jP)}(hvoidh]hvoid}(hjCaller saved interrupt state, from read_seqlock_excl_irqsave()h]h>Caller saved interrupt state, from read_seqlock_excl_irqsave()}(hj[EhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM@hjXEubah}(h]h ]h"]h$]h&]uh1jhjFhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj,Fubj)}(hjh]h*}(hjLFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,Fubj)}(hseqh]hseq}(hjYFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,Fubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjEubeh}(h]h ]h"]h$]h&]hhuh1jhjEhhhjEhMIubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjEhhhjEhMIubah}(h]jEah ](jj eh"]h$]h&]j j)jhuh1jhjEhMIhjEhhubj)}(hhh]h)}(h,begin a seqlock_t lockless or locking readerh]h,begin a seqlock_t lockless or locking reader}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMIhjFhhubah}(h]h ]h"]h$]h&]uh1jhjEhhhjEhMIubeh}(h]h ](jfunctioneh"]h$]h&]j#jj$jFj%jFj&j'j(uh1jhhhjhNhNubj[)}(hX**Parameters** ``seqlock_t *lock`` Pointer to seqlock_t ``int *seq`` Marker and return parameter. If the passed value is even, the reader will become a *lockless* seqlock_t reader as in read_seqbegin(). If the passed value is odd, the reader will become a *locking* reader as in read_seqlock_excl(). In the first call to this function, the caller *must* initialize and pass an even value to **seq**; this way, a lockless read can be optimistically tried first. **Description** read_seqbegin_or_lock is an API designed to optimistically try a normal lockless seqlock_t read section first. If an odd counter is found, the lockless read trial has failed, and the next read iteration transforms itself into a full seqlock_t locking reader. This is typically used to avoid seqlock_t lockless readers starvation (too much retry loops) in the case of a sharp spike in write side activity. Check Documentation/locking/seqlock.rst for template example code. **Context** if the seqlock_t write section, *or other read sections*, can be invoked from hardirq or softirq contexts, use the _irqsave or _bh variant of this function instead. **Return** the encountered sequence counter value, through the **seq** parameter, which is overloaded as a return parameter. This returned value must be checked with need_seqretry(). If the read section need to be retried, this returned value must also be passed as the **seq** parameter of the next read_seqbegin_or_lock() iteration.h](h)}(h**Parameters**h]je)}(hjFh]h Parameters}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjFubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMMhjFubj{)}(hhh](j)}(h)``seqlock_t *lock`` Pointer to seqlock_t h](j)}(h``seqlock_t *lock``h]jD)}(hjFh]hseqlock_t *lock}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjFubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMJhjFubj)}(hhh]h)}(hPointer to seqlock_th]hPointer to seqlock_t}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhMJhjFubah}(h]h ]h"]h$]h&]uh1jhjFubeh}(h]h ]h"]h$]h&]uh1jhjFhMJhjFubj)}(hX``int *seq`` Marker and return parameter. If the passed value is even, the reader will become a *lockless* seqlock_t reader as in read_seqbegin(). If the passed value is odd, the reader will become a *locking* reader as in read_seqlock_excl(). In the first call to this function, the caller *must* initialize and pass an even value to **seq**; this way, a lockless read can be optimistically tried first. h](j)}(h ``int *seq``h]jD)}(hjFh]hint *seq}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjFubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMPhjFubj)}(hhh]h)}(hXMarker and return parameter. If the passed value is even, the reader will become a *lockless* seqlock_t reader as in read_seqbegin(). If the passed value is odd, the reader will become a *locking* reader as in read_seqlock_excl(). In the first call to this function, the caller *must* initialize and pass an even value to **seq**; this way, a lockless read can be optimistically tried first.h](hSMarker and return parameter. If the passed value is even, the reader will become a }(hjGhhhNhNubj);)}(h *lockless*h]hlockless}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1j(;hjGubh^ seqlock_t reader as in read_seqbegin(). If the passed value is odd, the reader will become a }(hjGhhhNhNubj);)}(h *locking*h]hlocking}(hj0GhhhNhNubah}(h]h ]h"]h$]h&]uh1j(;hjGubhS reader as in read_seqlock_excl(). In the first call to this function, the caller }(hjGhhhNhNubj);)}(h*must*h]hmust}(hjBGhhhNhNubah}(h]h ]h"]h$]h&]uh1j(;hjGubh& initialize and pass an even value to }(hjGhhhNhNubje)}(h**seq**h]hseq}(hjTGhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjGubh>; this way, a lockless read can be optimistically tried first.}(hjGhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMKhjGubah}(h]h ]h"]h$]h&]uh1jhjFubeh}(h]h ]h"]h$]h&]uh1jhjGhMPhjFubeh}(h]h ]h"]h$]h&]uh1jzhjFubh)}(h**Description**h]je)}(hjGh]h Description}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjGubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMRhjFubh)}(hXread_seqbegin_or_lock is an API designed to optimistically try a normal lockless seqlock_t read section first. If an odd counter is found, the lockless read trial has failed, and the next read iteration transforms itself into a full seqlock_t locking reader.h]hXread_seqbegin_or_lock is an API designed to optimistically try a normal lockless seqlock_t read section first. If an odd counter is found, the lockless read trial has failed, and the next read iteration transforms itself into a full seqlock_t locking reader.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMQhjFubh)}(hThis is typically used to avoid seqlock_t lockless readers starvation (too much retry loops) in the case of a sharp spike in write side activity.h]hThis is typically used to avoid seqlock_t lockless readers starvation (too much retry loops) in the case of a sharp spike in write side activity.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMVhjFubh)}(hBCheck Documentation/locking/seqlock.rst for template example code.h]hBCheck Documentation/locking/seqlock.rst for template example code.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM[hjFubh)}(h **Context**h]je)}(hjGh]hContext}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjGubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM]hjFubh)}(hif the seqlock_t write section, *or other read sections*, can be invoked from hardirq or softirq contexts, use the _irqsave or _bh variant of this function instead.h](h if the seqlock_t write section, }(hjGhhhNhNubj);)}(h*or other read sections*h]hor other read sections}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1j(;hjGubhl, can be invoked from hardirq or softirq contexts, use the _irqsave or _bh variant of this function instead.}(hjGhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM[hjFubh)}(h **Return**h]je)}(hjGh]hReturn}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjGubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhM_hjFubh)}(hXCthe encountered sequence counter value, through the **seq** parameter, which is overloaded as a return parameter. This returned value must be checked with need_seqretry(). If the read section need to be retried, this returned value must also be passed as the **seq** parameter of the next read_seqbegin_or_lock() iteration.h](h4the encountered sequence counter value, through the }(hjHhhhNhNubje)}(h**seq**h]hseq}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjHubh parameter, which is overloaded as a return parameter. This returned value must be checked with need_seqretry(). If the read section need to be retried, this returned value must also be passed as the }(hjHhhhNhNubje)}(h**seq**h]hseq}(hj/HhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjHubh9 parameter of the next read_seqbegin_or_lock() iteration.}(hjHhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMahjFubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jneed_seqretry (C function)c.need_seqretryhNtauh1jhjhhhNhNubj)}(hhh](j)}(h,int need_seqretry (seqlock_t *lock, int seq)h]j)}(h+int need_seqretry(seqlock_t *lock, int seq)h](jP)}(hinth]hint}(hjhHhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjdHhhhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMpubjb)}(h h]h }(hjwHhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjdHhhhjvHhMpubj)}(h need_seqretryh]j)}(h need_seqretryh]h need_seqretry}(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubah}(h]h ](jjeh"]h$]h&]hhuh1jhjdHhhhjvHhMpubj)}(h(seqlock_t *lock, int seq)h](j)}(hseqlock_t *lockh](h)}(hhh]j)}(h seqlock_th]h seqlock_t}(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjHmodnameN classnameNjj)}j]j)}jjHsbc.need_seqretryasbuh1hhjHubjb)}(h h]h }(hjHhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjHubj)}(hjh]h*}(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubj)}(hlockh]hlock}(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjHubj)}(hint seqh](jP)}(hinth]hint}(hjHhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjHubjb)}(h h]h }(hj IhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjHubj)}(hseqh]hseq}(hjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjHubeh}(h]h ]h"]h$]h&]hhuh1jhjdHhhhjvHhMpubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj`HhhhjvHhMpubah}(h]j[Hah ](jj eh"]h$]h&]j j)jhuh1jhjvHhMphj]Hhhubj)}(hhh]h)}(h5validate seqlock_t "locking or lockless" read sectionh]h9validate seqlock_t “locking or lockless” read section}(hjBIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMphj?Ihhubah}(h]h ]h"]h$]h&]uh1jhj]HhhhjvHhMpubeh}(h]h ](jfunctioneh"]h$]h&]j#jj$jZIj%jZIj&j'j(uh1jhhhjhNhNubj[)}(h**Parameters** ``seqlock_t *lock`` Pointer to seqlock_t ``int seq`` sequence count, from read_seqbegin_or_lock() **Return** true if a read section retry is required, false otherwiseh](h)}(h**Parameters**h]je)}(hjdIh]h Parameters}(hjfIhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjbIubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMthj^Iubj{)}(hhh](j)}(h)``seqlock_t *lock`` Pointer to seqlock_t h](j)}(h``seqlock_t *lock``h]jD)}(hjIh]hseqlock_t *lock}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjIubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMqhj}Iubj)}(hhh]h)}(hPointer to seqlock_th]hPointer to seqlock_t}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIhMqhjIubah}(h]h ]h"]h$]h&]uh1jhj}Iubeh}(h]h ]h"]h$]h&]uh1jhjIhMqhjzIubj)}(h9``int seq`` sequence count, from read_seqbegin_or_lock() h](j)}(h ``int seq``h]jD)}(hjIh]hint seq}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jChjIubah}(h]h ]h"]h$]h&]uh1jhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMrhjIubj)}(hhh]h)}(h,sequence count, from read_seqbegin_or_lock()h]h,sequence count, from read_seqbegin_or_lock()}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIhMrhjIubah}(h]h ]h"]h$]h&]uh1jhjIubeh}(h]h ]h"]h$]h&]uh1jhjIh^gMrhjzIubeh}(h]h ]h"]h$]h&]uh1jzhj^Iubh)}(h **Return**h]je)}(hjIh]hReturn}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jdhjIubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMthj^Iubh)}(h9true if a read section retry is required, false otherwiseh]h9true if a read section retry is required, false otherwise}(hj JhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/locking/seqlock:241: ./include/linux/seqlock.hhMthj^Iubeh}(h]h ] kernelindentah"]h$]h&]uh1jZhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdone_seqretry (C function)c.done_seqretryhNtauh1jhjhhhNhNubj)}(hhh](j)}(h-void done_seqretry (seqlock_t *lock, int seq)h]j)}(h,void done_seqretry(seqlock_t *lock, int seq)h](jP)}(hvoidh]hvoid}(hjjCjHjMjpjujzjj^jcjBjGjj jjj j j"j"j#j#j&j&jY'j^'j(j(j)j)j*j*j,j ,j.j".j/j/j1j1jv2j{2j3j3jB5jG5j6j6j7j7j9j9j;j;j<j=jw>j|>j?j?j/Aj4AjoBjtBjCjCjEjEj[Hj`Hj/Jj4JjLjLjNjNu 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]h0Hyperlink target "seqcount-t" is not referenced.}hjQsbah}(h]h ]h"]h$]h&]uh1hhjQubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineK'uh1j~QubjQ)}(hhh]h)}(hhh]h9Hyperlink target "seqcount-locktype-t" is not referenced.}hjQsbah}(h]h ]h"]h$]h&]uh1hhjQubah}(h]h ]h"]h$]h&]levelKtypejQsourcehlineK\uh1j~QubjQ)}(hhh]h)}(hhh]h6Hyperlink target "seqcount-latch-t" is not referenced.}hjQsbah}(h]h ]h"]h$]h&]uh1hhjQubah}(h]h ]h"]h$]h&]levelKtypejQsourcehlineKuh1j~QubjQ)}(hhh]h)}(hhh]h/Hyperlink target "seqlock-t" is not referenced.}hjQsbah}(h]h ]h"]h$]h&]uh1hhjQubah}(h]h ]h"]h$]h&]levelKtypejQsourcehlineKuh1j~Qube transformerN include_log] decorationNhhub.