Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-doc
Path: blob/main/documentation/content/en/books/arch-handbook/locking/_index.po
18098 views
# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR The FreeBSD Project
# This file is distributed under the same license as the FreeBSD Documentation package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: FreeBSD Documentation VERSION\n"
"POT-Creation-Date: 2025-05-01 19:56-0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#. type: Title =
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:1
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:14
#, no-wrap
msgid "Locking Notes"
msgstr ""

#. type: YAML Front Matter: title
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:1
#, no-wrap
msgid "Chapter 2. Locking Notes"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:52
msgid ""
"_This chapter is maintained by the FreeBSD SMP Next Generation Project._"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:54
msgid ""
"This document outlines the locking used in the FreeBSD kernel to permit "
"effective multi-processing within the kernel. Locking can be achieved via "
"several means. Data structures can be protected by mutexes or man:lockmgr[9] "
"locks. A few variables are protected simply by always using atomic "
"operations to access them."
msgstr ""

#. type: Title ==
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:56
#, no-wrap
msgid "Mutexes"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:59
msgid ""
"A mutex is simply a lock used to guarantee mutual exclusion. Specifically, a "
"mutex may only be owned by one entity at a time. If another entity wishes to "
"obtain a mutex that is already owned, it must wait until the mutex is "
"released. In the FreeBSD kernel, mutexes are owned by processes."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:61
msgid ""
"Mutexes may be recursively acquired, but they are intended to be held for a "
"short period of time. Specifically, one may not sleep while holding a mutex. "
"If you need to hold a lock across a sleep, use a man:lockmgr[9] lock."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:63
msgid "Each mutex has several properties of interest:"
msgstr ""

#. type: Table
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:64
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:92
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:131
#, no-wrap
msgid "Variable Name"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:66
msgid "The name of the struct mtx variable in the kernel source."
msgstr ""

#. type: Table
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:67
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:93
#, no-wrap
msgid "Logical Name"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:69
msgid ""
"The name of the mutex assigned to it by `mtx_init`. This name is displayed "
"in KTR trace messages and witness errors and warnings and is used to "
"distinguish mutexes in the witness code."
msgstr ""

#. type: Table
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:70
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:94
#, no-wrap
msgid "Type"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:72
msgid ""
"The type of the mutex in terms of the `MTX_*` flags. The meaning for each "
"flag is related to its meaning as documented in man:mutex[9]."
msgstr ""

#. type: Table
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:73
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:106
#, no-wrap
msgid "`MTX_DEF`"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:75
msgid "A sleep mutex"
msgstr ""

#. type: Labeled list
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:76
#, no-wrap
msgid "`MTX_SPIN`"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:78
msgid "A spin mutex"
msgstr ""

#. type: Table
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:79
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:100
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:112
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:118
#, no-wrap
msgid "`MTX_RECURSE`"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:81
msgid "This mutex is allowed to recurse."
msgstr ""

#. type: Table
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:82
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:95
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:133
#, no-wrap
msgid "Protectees"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:84
msgid ""
"A list of data structures or data structure members that this entry "
"protects. For data structure members, the name will be in the form of "
"`structure name`.`member name`."
msgstr ""

#. type: Table
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:85
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:97
#, no-wrap
msgid "Dependent Functions"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:87
msgid "Functions that can only be called if this mutex is held."
msgstr ""

#. type: Block title
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:88
#, no-wrap
msgid "Mutex List"
msgstr ""

#. type: Table
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:98
#, no-wrap
msgid "sched_lock"
msgstr ""

#. type: Table
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:99
#, no-wrap
msgid "\"sched lock\""
msgstr ""

#. type: Table
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:99
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:117
#, no-wrap
msgid "`MTX_SPIN` \\"
msgstr ""

#. type: Table
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:101
#, no-wrap
msgid "`_gmonparam`, `cnt.v_swtch`, `cp_time`, `curpriority`, `mtx`.`mtx_blocked`, `mtx`.`mtx_contested`, `proc`.`p_procq`, `proc`.`p_slpq`, `proc`.`p_sflag`, `proc`.`p_stat`, `proc`.`p_estcpu`, `proc`.`p_cpticks` `proc`.`p_pctcpu`, `proc`.`p_wchan`, `proc`.`p_wmesg`, `proc`.`p_swtime`, `proc`.`p_slptime`, `proc`.`p_runtime`, `proc`.`p_uu`, `proc`.`p_su`, `proc`.`p_iu`, `proc`.`p_uticks`, `proc`.`p_sticks`, `proc`.`p_iticks`, `proc`.`p_oncpu`, `proc`.`p_lastcpu`, `proc`.`p_rqindex`, `proc`.`p_heldmtx`, `proc`.`p_blocked`, `proc`.`p_mtxname`, `proc`.`p_contested`, `proc`.`p_priority`, `proc`.`p_usrpri`, `proc`.`p_nativepri`, `proc`.`p_nice`, `proc`.`p_rtprio`, `pscnt`, `slpque`, `itqueuebits`, `itqueues`, `rtqueuebits`, `rtqueues`, `queuebits`, `queues`, `idqueuebits`, `idqueues`, `switchtime`, `switchticks`"
msgstr ""

#. type: Table
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:103
#, no-wrap
msgid "`setrunqueue`, `remrunqueue`, `mi_switch`, `chooseproc`, `schedclock`, `resetpriority`, `updatepri`, `maybe_resched`, `cpu_switch`, `cpu_throw`, `need_resched`, `resched_wanted`, `clear_resched`, `aston`, `astoff`, `astpending`, `calcru`, `proc_compare`"
msgstr ""

#. type: Table
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:104
#, no-wrap
msgid "vm86pcb_lock"
msgstr ""

#. type: Table
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:105
#, no-wrap
msgid "\"vm86pcb lock\""
msgstr ""

#. type: Table
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:107
#, no-wrap
msgid "`vm86pcb`"
msgstr ""

#. type: Table
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:109
#, no-wrap
msgid "`vm86_bioscall`"
msgstr ""

#. type: Table
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:110
#, no-wrap
msgid "Giant"
msgstr ""

#. type: Table
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:111
#, no-wrap
msgid "\"Giant\""
msgstr ""

#. type: Table
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:111
#, no-wrap
msgid "`MTX_DEF` \\"
msgstr ""

#. type: Table
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:113
#, no-wrap
msgid "nearly everything"
msgstr ""

#. type: Table
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:115
#, no-wrap
msgid "lots"
msgstr ""

#. type: Table
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:116
#, no-wrap
msgid "callout_lock"
msgstr ""

#. type: Table
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:117
#, no-wrap
msgid "\"callout lock\""
msgstr ""

#. type: Table
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:119
#, no-wrap
msgid "`callfree`, `callwheel`, `nextsoftcheck`, `proc`.`p_itcallout`, `proc`.`p_slpcallout`, `softticks`, `ticks`"
msgstr ""

#. type: Title ==
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:123
#, no-wrap
msgid "Shared Exclusive Locks"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:126
msgid ""
"These locks provide basic reader-writer type functionality and may be held "
"by a sleeping process. Currently they are backed by man:lockmgr[9]."
msgstr ""

#. type: Block title
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:127
#, no-wrap
msgid "Shared Exclusive Lock List"
msgstr ""

#. type: Table
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:134
#, no-wrap
msgid "`allproc_lock`"
msgstr ""

#. type: Table
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:136
#, no-wrap
msgid "`allproc` `zombproc` `pidhashtbl` `proc`.`p_list` `proc`.`p_hash` `nextpid`"
msgstr ""

#. type: Table
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:137
#, no-wrap
msgid "`proctree_lock`"
msgstr ""

#. type: Table
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:138
#, no-wrap
msgid "`proc`.`p_children` `proc`.`p_sibling`"
msgstr ""

#. type: Title ==
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:141
#, no-wrap
msgid "Atomically Protected Variables"
msgstr ""

#. type: Plain text
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:144
msgid ""
"An atomically protected variable is a special variable that is not protected "
"by an explicit lock. Instead, all data accesses to the variables use special "
"atomic operations as described in man:atomic[9]. Very few variables are "
"treated this way, although other synchronization primitives such as mutexes "
"are implemented with atomically protected variables."
msgstr ""

#. type: Plain text
#: documentation/content/en/books/arch-handbook/locking/_index.adoc:145
msgid "`mtx`.`mtx_lock`"
msgstr ""