€•ÅŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ3/translations/zh_CN/core-api/wrappers/atomic_bitops”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/zh_TW/core-api/wrappers/atomic_bitops”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/it_IT/core-api/wrappers/atomic_bitops”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/ja_JP/core-api/wrappers/atomic_bitops”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/ko_KR/core-api/wrappers/atomic_bitops”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/sp_SP/core-api/wrappers/atomic_bitops”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ¡SPDX-License-Identifier: GPL-2.0 This is a simple wrapper to bring atomic_bitops.txt into the RST world until such a time as that file can be converted directly.”h]”hŒ¡SPDX-License-Identifier: GPL-2.0 This is a simple wrapper to bring atomic_bitops.txt into the RST world until such a time as that file can be converted directly.”…””}”hh£sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1h¡hhhžhhŸŒM/var/lib/git/docbuild/linux/Documentation/core-api/wrappers/atomic_bitops.rst”h KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ Atomic bitops”h]”hŒ Atomic bitops”…””}”(hh»hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hh¶hžhhŸh³h KubhŒraw”“”)”}”(hŒ \footnotesize”h]”hŒ \footnotesize”…””}”hhËsbah}”(h]”h ]”h"]”h$]”h&]”Œformat”Œlatex”h±h²uh1hÉhŸh³h K hh¶hžhubhŒ literal_block”“”)”}”(hX ============= Atomic bitops ============= While our bitmap_{}() functions are non-atomic, we have a number of operations operating on single bits in a bitmap that are atomic. API --- The single bit operations are: Non-RMW ops: test_bit() RMW atomic operations without return value: {set,clear,change}_bit() clear_bit_unlock() RMW atomic operations with return value: test_and_{set,clear,change}_bit() test_and_set_bit_lock() Barriers: smp_mb__{before,after}_atomic() All RMW atomic operations have a '__' prefixed variant which is non-atomic. SEMANTICS --------- Non-atomic ops: In particular __clear_bit_unlock() suffers the same issue as atomic_set(), which is why the generic version maps to clear_bit_unlock(), see atomic_t.txt. RMW ops: The test_and_{}_bit() operations return the original value of the bit. ORDERING -------- Like with atomic_t, the rule of thumb is: - non-RMW operations are unordered; - RMW operations that have no return value are unordered; - RMW operations that have a return value are fully ordered. - RMW operations that are conditional are fully ordered. Except for a successful test_and_set_bit_lock() which has ACQUIRE semantics, clear_bit_unlock() which has RELEASE semantics and test_bit_acquire which has ACQUIRE semantics. Since a platform only has a single means of achieving atomic operations the same barriers as for atomic_t are used, see atomic_t.txt. ”h]”hX ============= Atomic bitops ============= While our bitmap_{}() functions are non-atomic, we have a number of operations operating on single bits in a bitmap that are atomic. API --- The single bit operations are: Non-RMW ops: test_bit() RMW atomic operations without return value: {set,clear,change}_bit() clear_bit_unlock() RMW atomic operations with return value: test_and_{set,clear,change}_bit() test_and_set_bit_lock() Barriers: smp_mb__{before,after}_atomic() All RMW atomic operations have a '__' prefixed variant which is non-atomic. SEMANTICS --------- Non-atomic ops: In particular __clear_bit_unlock() suffers the same issue as atomic_set(), which is why the generic version maps to clear_bit_unlock(), see atomic_t.txt. RMW ops: The test_and_{}_bit() operations return the original value of the bit. ORDERING -------- Like with atomic_t, the rule of thumb is: - non-RMW operations are unordered; - RMW operations that have no return value are unordered; - RMW operations that have a return value are fully ordered. - RMW operations that are conditional are fully ordered. Except for a successful test_and_set_bit_lock() which has ACQUIRE semantics, clear_bit_unlock() which has RELEASE semantics and test_bit_acquire which has ACQUIRE semantics. Since a platform only has a single means of achieving atomic operations the same barriers as for atomic_t are used, see atomic_t.txt. ”…””}”hhÝsbah}”(h]”h ]”h"]”h$]”h&]”Œsource”ŒDocumentation/atomic_bitops.txt”h±h²uh1hÛh Khh¶hžhhŸh³ubhÊ)”}”(hŒ \normalsize”h]”hŒ \normalsize”…””}”hhísbah}”(h]”h ]”h"]”h$]”h&]”Œformat”Œlatex”h±h²uh1hÉhŸh³h Khh¶hžhubeh}”(h]”Œ atomic-bitops”ah ]”h"]”Œ atomic bitops”ah$]”h&]”uh1h´hhhžhhŸh³h Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”h³uh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(h¹NŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j(Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”h³Œ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”jhÿsŒ nametypes”}”j‰sh}”hÿh¶sŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nhžhub.