Units
Translation components API.
See the Weblate's Web API documentation for detailed description of the API.
GET /api/translations/freebsd-doc/articles_linux-emulation/en/units/?format=api&page=6
{ "count": 384, "next": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/units/?format=api&page=7", "previous": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/units/?format=api&page=5", "results": [ { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "The PID is used to identify the FreeBSD process that attaches this structure. The <function>child_se_tid</function> and <function>child_clear_tid</function> are used for TID address copyout when a process exits and is created. The <varname>shared</varname> pointer points to a structure shared among threads. The <varname>pdeath_signal</varname> variable identifies the parent death signal and the <varname>threads</varname> pointer is used to link this structure to the list of threads. The <literal>linux_emuldata_shared</literal> structure looks like:" ], "previous_source": "", "target": [ "The PID is used to identify the FreeBSD process that attaches this structure. The <function>child_se_tid</function> and <function>child_clear_tid</function> are used for TID address copyout when a process exits and is created. The <varname>shared</varname> pointer points to a structure shared among threads. The <varname>pdeath_signal</varname> variable identifies the parent death signal and the <varname>threads</varname> pointer is used to link this structure to the list of threads. The <literal>linux_emuldata_shared</literal> structure looks like:" ], "id_hash": -8578978677328102298, "content_hash": -8578978677328102298, "location": "article.translate.xml:1657", "context": "", "note": "(itstool) path: sect3/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 254, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 68, "source_unit": "https://translate-dev.freebsd.org/api/units/99652/?format=api", "priority": 100, "id": 99652, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=08f15858aa353c66", "url": "https://translate-dev.freebsd.org/api/units/99652/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:40.883519Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "struct linux_emuldata_shared {\n\n int refs;\n\n pid_t group_pid;\n\n LIST_HEAD(, linux_emuldata) threads; /* head of list of linux threads */\n};" ], "previous_source": "", "target": [ "struct linux_emuldata_shared {\n\n int refs;\n\n pid_t group_pid;\n\n LIST_HEAD(, linux_emuldata) threads; /* head of list of linux threads */\n};" ], "id_hash": -685808687184137576, "content_hash": -685808687184137576, "location": "article.translate.xml:1670", "context": "", "note": "(itstool) path: sect3/programlisting", "flags": "no-wrap", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 255, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 19, "source_unit": "https://translate-dev.freebsd.org/api/units/99653/?format=api", "priority": 100, "id": 99653, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=767b84a1f0833298", "url": "https://translate-dev.freebsd.org/api/units/99653/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:40.892394Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "The <varname>refs</varname> is a reference counter being used to determine when we can free the structure to avoid memory leaks. The <varname>group_pid</varname> is to identify PID ( = TGID) of the whole process ( = thread group). The <varname>threads</varname> pointer is the head of the list of threads in the process." ], "previous_source": "", "target": [ "The <varname>refs</varname> is a reference counter being used to determine when we can free the structure to avoid memory leaks. The <varname>group_pid</varname> is to identify PID ( = TGID) of the whole process ( = thread group). The <varname>threads</varname> pointer is the head of the list of threads in the process." ], "id_hash": -5933074717064232322, "content_hash": -5933074717064232322, "location": "article.translate.xml:1679", "context": "", "note": "(itstool) path: sect3/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 256, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 51, "source_unit": "https://translate-dev.freebsd.org/api/units/99654/?format=api", "priority": 100, "id": 99654, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=2da97bfac789027e", "url": "https://translate-dev.freebsd.org/api/units/99654/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:40.902201Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "The <literal>linux_emuldata</literal> structure can be obtained from the process using <function>em_find</function>. The prototype of the function is:" ], "previous_source": "", "target": [ "The <literal>linux_emuldata</literal> structure can be obtained from the process using <function>em_find</function>. The prototype of the function is:" ], "id_hash": 2356672893615665542, "content_hash": 2356672893615665542, "location": "article.translate.xml:1686", "context": "", "note": "(itstool) path: sect3/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 257, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 17, "source_unit": "https://translate-dev.freebsd.org/api/units/99655/?format=api", "priority": 100, "id": 99655, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=a0b49582b3c0f186", "url": "https://translate-dev.freebsd.org/api/units/99655/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:40.919727Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "struct linux_emuldata *em_find(struct proc *, int locked);" ], "previous_source": "", "target": [ "struct linux_emuldata *em_find(struct proc *, int locked);" ], "id_hash": -4939737216259653610, "content_hash": -4939737216259653610, "location": "article.translate.xml:1691", "context": "", "note": "(itstool) path: sect3/programlisting", "flags": "no-wrap", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 258, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 7, "source_unit": "https://translate-dev.freebsd.org/api/units/99656/?format=api", "priority": 100, "id": 99656, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=3b72872c75110016", "url": "https://translate-dev.freebsd.org/api/units/99656/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:40.926369Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "Here, <varname>proc</varname> is the process we want the emuldata structure from and the locked parameter determines whether we want to lock or not. The accepted values are <literal>EMUL_DOLOCK</literal> and <literal>EMUL_DOUNLOCK</literal>. More about locking later." ], "previous_source": "", "target": [ "Here, <varname>proc</varname> is the process we want the emuldata structure from and the locked parameter determines whether we want to lock or not. The accepted values are <literal>EMUL_DOLOCK</literal> and <literal>EMUL_DOUNLOCK</literal>. More about locking later." ], "id_hash": -6581487719180410332, "content_hash": -6581487719180410332, "location": "article.translate.xml:1693", "context": "", "note": "(itstool) path: sect3/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 259, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 34, "source_unit": "https://translate-dev.freebsd.org/api/units/99657/?format=api", "priority": 100, "id": 99657, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=24a9dbca24a7e224", "url": "https://translate-dev.freebsd.org/api/units/99657/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:40.933809Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "PID mangling" ], "previous_source": "", "target": [ "PID mangling" ], "id_hash": 7784120301590942195, "content_hash": 7784120301590942195, "location": "article.translate.xml:1702", "context": "", "note": "(itstool) path: sect3/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 260, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 2, "source_unit": "https://translate-dev.freebsd.org/api/units/99658/?format=api", "priority": 100, "id": 99658, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=ec06c02c193c11f3", "url": "https://translate-dev.freebsd.org/api/units/99658/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:40.940596Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "The above affects mainly getpid, getppid, gettid syscalls. Where we use PID/TGID respectively. In copyout of TIDs in <function>child_clear_tid</function> and <function>child_set_tid</function> we copy out FreeBSD PID." ], "previous_source": "", "target": [ "The above affects mainly getpid, getppid, gettid syscalls. Where we use PID/TGID respectively. In copyout of TIDs in <function>child_clear_tid</function> and <function>child_set_tid</function> we copy out FreeBSD PID." ], "id_hash": -6706289634729020190, "content_hash": -6706289634729020190, "location": "article.translate.xml:1716", "context": "", "note": "(itstool) path: sect3/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 262, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 26, "source_unit": "https://translate-dev.freebsd.org/api/units/99660/?format=api", "priority": 100, "id": 99660, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=22ee791bd117b4e2", "url": "https://translate-dev.freebsd.org/api/units/99660/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:40.972296Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "Clone syscall" ], "previous_source": "", "target": [ "Clone syscall" ], "id_hash": -7335231570000641755, "content_hash": -7335231570000641755, "location": "article.translate.xml:1724", "context": "", "note": "(itstool) path: sect3/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 263, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 2, "source_unit": "https://translate-dev.freebsd.org/api/units/99661/?format=api", "priority": 100, "id": 99661, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=1a3405c034e18125", "url": "https://translate-dev.freebsd.org/api/units/99661/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:40.981709Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "The <function>clone</function> syscall is the way threads are created in <trademark class=\"registered\">Linux</trademark>. The syscall prototype looks like this:" ], "previous_source": "", "target": [ "The <function>clone</function> syscall is the way threads are created in <trademark class=\"registered\">Linux</trademark>. The syscall prototype looks like this:" ], "id_hash": -3452126380569654707, "content_hash": -3452126380569654707, "location": "article.translate.xml:1726", "context": "", "note": "(itstool) path: sect3/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 264, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 18, "source_unit": "https://translate-dev.freebsd.org/api/units/99662/?format=api", "priority": 100, "id": 99662, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=50179558d6640a4d", "url": "https://translate-dev.freebsd.org/api/units/99662/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:40.990420Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "int linux_clone(l_int flags, void *stack, void *parent_tidptr, int dummy,\nvoid * child_tidptr);" ], "previous_source": "", "target": [ "int linux_clone(l_int flags, void *stack, void *parent_tidptr, int dummy,\nvoid * child_tidptr);" ], "id_hash": -6416199209925547108, "content_hash": -6416199209925547108, "location": "article.translate.xml:1730", "context": "", "note": "(itstool) path: sect3/programlisting", "flags": "no-wrap", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 265, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 12, "source_unit": "https://translate-dev.freebsd.org/api/units/99663/?format=api", "priority": 100, "id": 99663, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=26f514d0243eeb9c", "url": "https://translate-dev.freebsd.org/api/units/99663/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:40.998037Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "The <varname>flags</varname> parameter tells the syscall how exactly the processes should be cloned. As described above, <trademark class=\"registered\">Linux</trademark> can create processes sharing various things independently, for example two processes can share file descriptors but not VM, etc. Last byte of the <varname>flags</varname> parameter is the exit signal of the newly created process. The <varname>stack</varname> parameter if non-<literal>NULL</literal> tells, where the thread stack is and if it is <literal>NULL</literal> we are supposed to copy-on-write the calling process stack (i.e. do what normal <citerefentry><refentrytitle>fork</refentrytitle><manvolnum>2</manvolnum></citerefentry> routine does). The <varname>parent_tidptr</varname> parameter is used as an address for copying out process PID (i.e. thread id) once the process is sufficiently instantiated but is not runnable yet. The <varname>dummy</varname> parameter is here because of the very strange calling convention of this syscall on i386. It uses the registers directly and does not let the compiler do it what results in the need of a dummy syscall. The <varname>child_tidptr</varname> parameter is used as an address for copying out PID once the process has finished forking and when the process exits." ], "previous_source": "", "target": [ "The <varname>flags</varname> parameter tells the syscall how exactly the processes should be cloned. As described above, <trademark class=\"registered\">Linux</trademark> can create processes sharing various things independently, for example two processes can share file descriptors but not VM, etc. Last byte of the <varname>flags</varname> parameter is the exit signal of the newly created process. The <varname>stack</varname> parameter if non-<literal>NULL</literal> tells, where the thread stack is and if it is <literal>NULL</literal> we are supposed to copy-on-write the calling process stack (i.e. do what normal <citerefentry><refentrytitle>fork</refentrytitle><manvolnum>2</manvolnum></citerefentry> routine does). The <varname>parent_tidptr</varname> parameter is used as an address for copying out process PID (i.e. thread id) once the process is sufficiently instantiated but is not runnable yet. The <varname>dummy</varname> parameter is here because of the very strange calling convention of this syscall on i386. It uses the registers directly and does not let the compiler do it what results in the need of a dummy syscall. The <varname>child_tidptr</varname> parameter is used as an address for copying out PID once the process has finished forking and when the process exits." ], "id_hash": 3677646625374218858, "content_hash": 3677646625374218858, "location": "article.translate.xml:1733", "context": "", "note": "(itstool) path: sect3/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 266, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 173, "source_unit": "https://translate-dev.freebsd.org/api/units/99664/?format=api", "priority": 100, "id": 99664, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=b309a01eead82a6a", "url": "https://translate-dev.freebsd.org/api/units/99664/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.010045Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "The syscall itself proceeds by setting corresponding flags depending on the flags passed in. For example, <literal>CLONE_VM</literal> maps to RFMEM (sharing of VM), etc. The only nit here is <literal>CLONE_FS</literal> and <literal>CLONE_FILES</literal> because FreeBSD does not allow setting this separately so we fake it by not setting RFFDG (copying of fd table and other fs information) if either of these is defined. This does not cause any problems, because those flags are always set together. After setting the flags the process is forked using the internal <function>fork1</function> routine, the process is instrumented not to be put on a run queue, i.e. not to be set runnable. After the forking is done we possibly reparent the newly created process to emulate <literal>CLONE_PARENT</literal> semantics. Next part is creating the emulation data. Threads in <trademark class=\"registered\">Linux</trademark> does not signal their parents so we set exit signal to be 0 to disable this. After that setting of <varname>child_set_tid</varname> and <varname>child_clear_tid</varname> is performed enabling the functionality later in the code. At this point we copy out the PID to the address specified by <varname>parent_tidptr</varname>. The setting of process stack is done by simply rewriting thread frame <varname>%esp</varname> register (<varname>%rsp</varname> on amd64). Next part is setting up TLS for the newly created process. After this <citerefentry><refentrytitle>vfork</refentrytitle><manvolnum>2</manvolnum></citerefentry> semantics might be emulated and finally the newly created process is put on a run queue and copying out its PID to the parent process via <function>clone</function> return value is done." ], "previous_source": "", "target": [ "The syscall itself proceeds by setting corresponding flags depending on the flags passed in. For example, <literal>CLONE_VM</literal> maps to RFMEM (sharing of VM), etc. The only nit here is <literal>CLONE_FS</literal> and <literal>CLONE_FILES</literal> because FreeBSD does not allow setting this separately so we fake it by not setting RFFDG (copying of fd table and other fs information) if either of these is defined. This does not cause any problems, because those flags are always set together. After setting the flags the process is forked using the internal <function>fork1</function> routine, the process is instrumented not to be put on a run queue, i.e. not to be set runnable. After the forking is done we possibly reparent the newly created process to emulate <literal>CLONE_PARENT</literal> semantics. Next part is creating the emulation data. Threads in <trademark class=\"registered\">Linux</trademark> does not signal their parents so we set exit signal to be 0 to disable this. After that setting of <varname>child_set_tid</varname> and <varname>child_clear_tid</varname> is performed enabling the functionality later in the code. At this point we copy out the PID to the address specified by <varname>parent_tidptr</varname>. The setting of process stack is done by simply rewriting thread frame <varname>%esp</varname> register (<varname>%rsp</varname> on amd64). Next part is setting up TLS for the newly created process. After this <citerefentry><refentrytitle>vfork</refentrytitle><manvolnum>2</manvolnum></citerefentry> semantics might be emulated and finally the newly created process is put on a run queue and copying out its PID to the parent process via <function>clone</function> return value is done." ], "id_hash": -8898207498555174938, "content_hash": -8898207498555174938, "location": "article.translate.xml:1755", "context": "", "note": "(itstool) path: sect3/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 267, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 241, "source_unit": "https://translate-dev.freebsd.org/api/units/99665/?format=api", "priority": 100, "id": 99665, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=0483376cbee6cfe6", "url": "https://translate-dev.freebsd.org/api/units/99665/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.020227Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "The <function>clone</function> syscall is able and in fact is used for emulating classic <citerefentry><refentrytitle>fork</refentrytitle><manvolnum>2</manvolnum></citerefentry> and <citerefentry><refentrytitle>vfork</refentrytitle><manvolnum>2</manvolnum></citerefentry> syscalls. Newer glibc in a case of 2.6 kernel uses <function>clone</function> to implement <citerefentry><refentrytitle>fork</refentrytitle><manvolnum>2</manvolnum></citerefentry> and <citerefentry><refentrytitle>vfork</refentrytitle><manvolnum>2</manvolnum></citerefentry> syscalls." ], "previous_source": "", "target": [ "The <function>clone</function> syscall is able and in fact is used for emulating classic <citerefentry><refentrytitle>fork</refentrytitle><manvolnum>2</manvolnum></citerefentry> and <citerefentry><refentrytitle>vfork</refentrytitle><manvolnum>2</manvolnum></citerefentry> syscalls. Newer glibc in a case of 2.6 kernel uses <function>clone</function> to implement <citerefentry><refentrytitle>fork</refentrytitle><manvolnum>2</manvolnum></citerefentry> and <citerefentry><refentrytitle>vfork</refentrytitle><manvolnum>2</manvolnum></citerefentry> syscalls." ], "id_hash": 3467044271284259785, "content_hash": 3467044271284259785, "location": "article.translate.xml:1786", "context": "", "note": "(itstool) path: sect3/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 268, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 33, "source_unit": "https://translate-dev.freebsd.org/api/units/99666/?format=api", "priority": 100, "id": 99666, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=b01d6a6542738bc9", "url": "https://translate-dev.freebsd.org/api/units/99666/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.039336Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "TLS" ], "previous_source": "", "target": [ "TLS" ], "id_hash": -6083287485047630710, "content_hash": -6083287485047630710, "location": "article.translate.xml:1812", "context": "", "note": "(itstool) path: sect2/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 271, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/99668/?format=api", "priority": 100, "id": 99668, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=2b93d2435328148a", "url": "https://translate-dev.freebsd.org/api/units/99668/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.087399Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "This section deals with TLS also known as thread local storage." ], "previous_source": "", "target": [ "This section deals with TLS also known as thread local storage." ], "id_hash": 2672691227044434589, "content_hash": 2672691227044434589, "location": "article.translate.xml:1814", "context": "", "note": "(itstool) path: sect2/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 272, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 11, "source_unit": "https://translate-dev.freebsd.org/api/units/99669/?format=api", "priority": 100, "id": 99669, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=a5174e82ae49529d", "url": "https://translate-dev.freebsd.org/api/units/99669/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.102245Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "Introduction to threading" ], "previous_source": "", "target": [ "Introduction to threading" ], "id_hash": 2234666992120279224, "content_hash": 2234666992120279224, "location": "article.translate.xml:1818", "context": "", "note": "(itstool) path: sect3/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 273, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 3, "source_unit": "https://translate-dev.freebsd.org/api/units/99670/?format=api", "priority": 100, "id": 99670, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=9f0321ca209eb0b8", "url": "https://translate-dev.freebsd.org/api/units/99670/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.112384Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "Threads in computer science are entities within a process that can be scheduled independently from each other. The threads in the process share process wide data (file descriptors, etc.) but also have their own stack for their own data. Sometimes there is a need for process-wide data specific to a given thread. Imagine a name of the thread in execution or something like that. The traditional <trademark class=\"registered\">UNIX</trademark> threading API, <application>pthreads</application> provides a way to do it via <citerefentry><refentrytitle>pthread_key_create</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>pthread_setspecific</refentrytitle><manvolnum>3</manvolnum></citerefentry> and <citerefentry><refentrytitle>pthread_getspecific</refentrytitle><manvolnum>3</manvolnum></citerefentry> where a thread can create a key to the thread local data and using <citerefentry><refentrytitle>pthread_getspecific</refentrytitle><manvolnum>3</manvolnum></citerefentry> or <citerefentry><refentrytitle>pthread_getspecific</refentrytitle><manvolnum>3</manvolnum></citerefentry> to manipulate those data. You can easily see that this is not the most comfortable way this could be accomplished. So various producers of C/C++ compilers introduced a better way. They defined a new modifier keyword thread that specifies that a variable is thread specific. A new method of accessing such variables was developed as well (at least on i386). The <application>pthreads</application> method tends to be implemented in userspace as a trivial lookup table. The performance of such a solution is not very good. So the new method uses (on i386) segment registers to address a segment, where TLS area is stored so the actual accessing of a thread variable is just appending the segment register to the address thus addressing via it. The segment registers are usually <varname>%gs</varname> and <varname>%fs</varname> acting like segment selectors. Every thread has its own area where the thread local data are stored and the segment must be loaded on every context switch. This method is very fast and used almost exclusively in the whole i386 <trademark class=\"registered\">UNIX</trademark> world. Both FreeBSD and <trademark class=\"registered\">Linux</trademark> implement this approach and it yields very good results. The only drawback is the need to reload the segment on every context switch which can slowdown context switches. FreeBSD tries to avoid this overhead by using only 1 segment descriptor for this while <trademark class=\"registered\">Linux</trademark> uses 3. Interesting thing is that almost nothing uses more than 1 descriptor (only <application>Wine</application> seems to use 2) so <trademark class=\"registered\">Linux</trademark> pays this unnecessary price for context switches." ], "previous_source": "", "target": [ "Threads in computer science are entities within a process that can be scheduled independently from each other. The threads in the process share process wide data (file descriptors, etc.) but also have their own stack for their own data. Sometimes there is a need for process-wide data specific to a given thread. Imagine a name of the thread in execution or something like that. The traditional <trademark class=\"registered\">UNIX</trademark> threading API, <application>pthreads</application> provides a way to do it via <citerefentry><refentrytitle>pthread_key_create</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>pthread_setspecific</refentrytitle><manvolnum>3</manvolnum></citerefentry> and <citerefentry><refentrytitle>pthread_getspecific</refentrytitle><manvolnum>3</manvolnum></citerefentry> where a thread can create a key to the thread local data and using <citerefentry><refentrytitle>pthread_getspecific</refentrytitle><manvolnum>3</manvolnum></citerefentry> or <citerefentry><refentrytitle>pthread_getspecific</refentrytitle><manvolnum>3</manvolnum></citerefentry> to manipulate those data. You can easily see that this is not the most comfortable way this could be accomplished. So various producers of C/C++ compilers introduced a better way. They defined a new modifier keyword thread that specifies that a variable is thread specific. A new method of accessing such variables was developed as well (at least on i386). The <application>pthreads</application> method tends to be implemented in userspace as a trivial lookup table. The performance of such a solution is not very good. So the new method uses (on i386) segment registers to address a segment, where TLS area is stored so the actual accessing of a thread variable is just appending the segment register to the address thus addressing via it. The segment registers are usually <varname>%gs</varname> and <varname>%fs</varname> acting like segment selectors. Every thread has its own area where the thread local data are stored and the segment must be loaded on every context switch. This method is very fast and used almost exclusively in the whole i386 <trademark class=\"registered\">UNIX</trademark> world. Both FreeBSD and <trademark class=\"registered\">Linux</trademark> implement this approach and it yields very good results. The only drawback is the need to reload the segment on every context switch which can slowdown context switches. FreeBSD tries to avoid this overhead by using only 1 segment descriptor for this while <trademark class=\"registered\">Linux</trademark> uses 3. Interesting thing is that almost nothing uses more than 1 descriptor (only <application>Wine</application> seems to use 2) so <trademark class=\"registered\">Linux</trademark> pays this unnecessary price for context switches." ], "id_hash": 960278411420594378, "content_hash": 960278411420594378, "location": "article.translate.xml:1820", "context": "", "note": "(itstool) path: sect3/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 274, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 352, "source_unit": "https://translate-dev.freebsd.org/api/units/99671/?format=api", "priority": 100, "id": 99671, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=8d5398209e3370ca", "url": "https://translate-dev.freebsd.org/api/units/99671/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.119672Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "Segments on i386" ], "previous_source": "", "target": [ "Segments on i386" ], "id_hash": -3610413939091134662, "content_hash": -3610413939091134662, "location": "article.translate.xml:1864", "context": "", "note": "(itstool) path: sect3/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 275, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 3, "source_unit": "https://translate-dev.freebsd.org/api/units/99672/?format=api", "priority": 100, "id": 99672, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=4de53ba6b45aa73a", "url": "https://translate-dev.freebsd.org/api/units/99672/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.128643Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "The i386 architecture implements the so called segments. A segment is a description of an area of memory. The base address (bottom) of the memory area, the end of it (ceiling), type, protection, etc. The memory described by a segment can be accessed using segment selector registers (<varname>%cs</varname>, <varname>%ds</varname>, <varname>%ss</varname>, <varname>%es</varname>, <varname>%fs</varname>, <varname>%gs</varname>). For example let us suppose we have a segment which base address is 0x1234 and length and this code:" ], "previous_source": "", "target": [ "The i386 architecture implements the so called segments. A segment is a description of an area of memory. The base address (bottom) of the memory area, the end of it (ceiling), type, protection, etc. The memory described by a segment can be accessed using segment selector registers (<varname>%cs</varname>, <varname>%ds</varname>, <varname>%ss</varname>, <varname>%es</varname>, <varname>%fs</varname>, <varname>%gs</varname>). For example let us suppose we have a segment which base address is 0x1234 and length and this code:" ], "id_hash": 3651584777549127436, "content_hash": 3651584777549127436, "location": "article.translate.xml:1866", "context": "", "note": "(itstool) path: sect3/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 276, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 72, "source_unit": "https://translate-dev.freebsd.org/api/units/99673/?format=api", "priority": 100, "id": 99673, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=b2ad09021d0a1f0c", "url": "https://translate-dev.freebsd.org/api/units/99673/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.139739Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "mov %edx,%gs:0x10" ], "previous_source": "", "target": [ "mov %edx,%gs:0x10" ], "id_hash": 2372713590139423134, "content_hash": 2372713590139423134, "location": "article.translate.xml:1877", "context": "", "note": "(itstool) path: sect3/programlisting", "flags": "no-wrap", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 277, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 2, "source_unit": "https://translate-dev.freebsd.org/api/units/99674/?format=api", "priority": 100, "id": 99674, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=a0ed92706600899e", "url": "https://translate-dev.freebsd.org/api/units/99674/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.147644Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "This will load the content of the <varname>%edx</varname> register into memory location 0x1244. Some segment registers have a special use, for example <varname>%cs</varname> is used for code segment and <varname>%ss</varname> is used for stack segment but <varname>%fs</varname> and <varname>%gs</varname> are generally unused. Segments are either stored in a global GDT table or in a local LDT table. LDT is accessed via an entry in the GDT. The LDT can store more types of segments. LDT can be per process. Both tables define up to 8191 entries." ], "previous_source": "", "target": [ "This will load the content of the <varname>%edx</varname> register into memory location 0x1244. Some segment registers have a special use, for example <varname>%cs</varname> is used for code segment and <varname>%ss</varname> is used for stack segment but <varname>%fs</varname> and <varname>%gs</varname> are generally unused. Segments are either stored in a global GDT table or in a local LDT table. LDT is accessed via an entry in the GDT. The LDT can store more types of segments. LDT can be per process. Both tables define up to 8191 entries." ], "id_hash": 493410402159751482, "content_hash": 493410402159751482, "location": "article.translate.xml:1879", "context": "", "note": "(itstool) path: sect3/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 278, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 86, "source_unit": "https://translate-dev.freebsd.org/api/units/99675/?format=api", "priority": 100, "id": 99675, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=86d8f2258536f13a", "url": "https://translate-dev.freebsd.org/api/units/99675/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.162548Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "Implementation on <trademark class=\"registered\">Linux</trademark> i386" ], "previous_source": "", "target": [ "Implementation on <trademark class=\"registered\">Linux</trademark> i386" ], "id_hash": 3515961687333544630, "content_hash": 3515961687333544630, "location": "article.translate.xml:1893", "context": "", "note": "(itstool) path: sect3/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 279, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 5, "source_unit": "https://translate-dev.freebsd.org/api/units/99676/?format=api", "priority": 100, "id": 99676, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=b0cb3486b96622b6", "url": "https://translate-dev.freebsd.org/api/units/99676/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.173452Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "There are two main ways of setting up TLS in <trademark class=\"registered\">Linux</trademark>. It can be set when cloning a process using the <function>clone</function> syscall or it can call <function>set_thread_area</function>. When a process passes <literal>CLONE_SETTLS</literal> flag to <function>clone</function>, the kernel expects the memory pointed to by the <varname>%esi</varname> register a <trademark class=\"registered\">Linux</trademark> user space representation of a segment, which gets translated to the machine representation of a segment and loaded into a GDT slot. The GDT slot can be specified with a number or -1 can be used meaning that the system itself should choose the first free slot. In practice, the vast majority of programs use only one TLS entry and does not care about the number of the entry. We exploit this in the emulation and in fact depend on it." ], "previous_source": "", "target": [ "There are two main ways of setting up TLS in <trademark class=\"registered\">Linux</trademark>. It can be set when cloning a process using the <function>clone</function> syscall or it can call <function>set_thread_area</function>. When a process passes <literal>CLONE_SETTLS</literal> flag to <function>clone</function>, the kernel expects the memory pointed to by the <varname>%esi</varname> register a <trademark class=\"registered\">Linux</trademark> user space representation of a segment, which gets translated to the machine representation of a segment and loaded into a GDT slot. The GDT slot can be specified with a number or -1 can be used meaning that the system itself should choose the first free slot. In practice, the vast majority of programs use only one TLS entry and does not care about the number of the entry. We exploit this in the emulation and in fact depend on it." ], "id_hash": -8338122589942560075, "content_hash": -8338122589942560075, "location": "article.translate.xml:1895", "context": "", "note": "(itstool) path: sect3/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 280, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 132, "source_unit": "https://translate-dev.freebsd.org/api/units/99677/?format=api", "priority": 100, "id": 99677, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=0c4909ae84d04ab5", "url": "https://translate-dev.freebsd.org/api/units/99677/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.185557Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "Emulation of <trademark class=\"registered\">Linux</trademark> TLS" ], "previous_source": "", "target": [ "Emulation of <trademark class=\"registered\">Linux</trademark> TLS" ], "id_hash": 50902934349687104, "content_hash": 50902934349687104, "location": "article.translate.xml:1913", "context": "", "note": "(itstool) path: sect3/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 281, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 5, "source_unit": "https://translate-dev.freebsd.org/api/units/99678/?format=api", "priority": 100, "id": 99678, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=80b4d7f2f7f02940", "url": "https://translate-dev.freebsd.org/api/units/99678/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.194318Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "i386" ], "previous_source": "", "target": [ "i386" ], "id_hash": -1759351797457954696, "content_hash": -1759351797457954696, "location": "article.translate.xml:1916", "context": "", "note": "(itstool) path: sect4/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 282, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/99679/?format=api", "priority": 100, "id": 99679, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=679586dc9592d878", "url": "https://translate-dev.freebsd.org/api/units/99679/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.203851Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "Loading of TLS for the current thread happens by calling <function>set_thread_area</function> while loading TLS for a second process in <function>clone</function> is done in the separate block in <function>clone</function>. Those two functions are very similar. The only difference being the actual loading of the GDT segment, which happens on the next context switch for the newly created process while <function>set_thread_area</function> must load this directly. The code basically does this. It copies the <trademark class=\"registered\">Linux</trademark> form segment descriptor from the userland. The code checks for the number of the descriptor but because this differs between FreeBSD and <trademark class=\"registered\">Linux</trademark> we fake it a little. We only support indexes of 6, 3 and -1. The 6 is genuine <trademark class=\"registered\">Linux</trademark> number, 3 is genuine FreeBSD one and -1 means autoselection. Then we set the descriptor number to constant 3 and copy out this to the userspace. We rely on the userspace process using the number from the descriptor but this works most of the time (have never seen a case where this did not work) as the userspace process typically passes in 1. Then we convert the descriptor from the <trademark class=\"registered\">Linux</trademark> form to a machine dependant form (i.e. operating system independent form) and copy this to the FreeBSD defined segment descriptor. Finally we can load it. We assign the descriptor to threads PCB (process control block) and load the <varname>%gs</varname> segment using <function>load_gs</function>. This loading must be done in a critical section so that nothing can interrupt us. The <literal>CLONE_SETTLS</literal> case works exactly like this just the loading using <function>load_gs</function> is not performed. The segment used for this (segment number 3) is shared for this use between FreeBSD processes and <trademark class=\"registered\">Linux</trademark> processes so the <trademark class=\"registered\">Linux</trademark> emulation layer does not add any overhead over plain FreeBSD." ], "previous_source": "", "target": [ "Loading of TLS for the current thread happens by calling <function>set_thread_area</function> while loading TLS for a second process in <function>clone</function> is done in the separate block in <function>clone</function>. Those two functions are very similar. The only difference being the actual loading of the GDT segment, which happens on the next context switch for the newly created process while <function>set_thread_area</function> must load this directly. The code basically does this. It copies the <trademark class=\"registered\">Linux</trademark> form segment descriptor from the userland. The code checks for the number of the descriptor but because this differs between FreeBSD and <trademark class=\"registered\">Linux</trademark> we fake it a little. We only support indexes of 6, 3 and -1. The 6 is genuine <trademark class=\"registered\">Linux</trademark> number, 3 is genuine FreeBSD one and -1 means autoselection. Then we set the descriptor number to constant 3 and copy out this to the userspace. We rely on the userspace process using the number from the descriptor but this works most of the time (have never seen a case where this did not work) as the userspace process typically passes in 1. Then we convert the descriptor from the <trademark class=\"registered\">Linux</trademark> form to a machine dependant form (i.e. operating system independent form) and copy this to the FreeBSD defined segment descriptor. Finally we can load it. We assign the descriptor to threads PCB (process control block) and load the <varname>%gs</varname> segment using <function>load_gs</function>. This loading must be done in a critical section so that nothing can interrupt us. The <literal>CLONE_SETTLS</literal> case works exactly like this just the loading using <function>load_gs</function> is not performed. The segment used for this (segment number 3) is shared for this use between FreeBSD processes and <trademark class=\"registered\">Linux</trademark> processes so the <trademark class=\"registered\">Linux</trademark> emulation layer does not add any overhead over plain FreeBSD." ], "id_hash": -5039255757245215466, "content_hash": -5039255757245215466, "location": "article.translate.xml:1918", "context": "", "note": "(itstool) path: sect4/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 283, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 295, "source_unit": "https://translate-dev.freebsd.org/api/units/99680/?format=api", "priority": 100, "id": 99680, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=3a10f796810e8d16", "url": "https://translate-dev.freebsd.org/api/units/99680/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.218970Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "amd64" ], "previous_source": "", "target": [ "amd64" ], "id_hash": -1226008040941083138, "content_hash": -1226008040941083138, "location": "article.translate.xml:1955", "context": "", "note": "(itstool) path: sect4/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 284, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/99681/?format=api", "priority": 100, "id": 99681, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=6efc582eb3ef25fe", "url": "https://translate-dev.freebsd.org/api/units/99681/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.225721Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "The amd64 implementation is similar to the i386 one but there was initially no 32bit segment descriptor used for this purpose (hence not even native 32bit TLS users worked) so we had to add such a segment and implement its loading on every context switch (when a flag signaling use of 32bit is set). Apart from this the TLS loading is exactly the same just the segment numbers are different and the descriptor format and the loading differs slightly." ], "previous_source": "", "target": [ "The amd64 implementation is similar to the i386 one but there was initially no 32bit segment descriptor used for this purpose (hence not even native 32bit TLS users worked) so we had to add such a segment and implement its loading on every context switch (when a flag signaling use of 32bit is set). Apart from this the TLS loading is exactly the same just the segment numbers are different and the descriptor format and the loading differs slightly." ], "id_hash": 2275480040002030142, "content_hash": 2275480040002030142, "location": "article.translate.xml:1957", "context": "", "note": "(itstool) path: sect4/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 285, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 79, "source_unit": "https://translate-dev.freebsd.org/api/units/99682/?format=api", "priority": 100, "id": 99682, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=9f94210a55d00a3e", "url": "https://translate-dev.freebsd.org/api/units/99682/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.236166Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "Futexes" ], "previous_source": "", "target": [ "Futexes" ], "id_hash": -3873003796585196237, "content_hash": -3873003796585196237, "location": "article.translate.xml:1971", "context": "", "note": "(itstool) path: sect2/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 286, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/99683/?format=api", "priority": 100, "id": 99683, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=4a4053912accd533", "url": "https://translate-dev.freebsd.org/api/units/99683/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.243701Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "Introduction to synchronization" ], "previous_source": "", "target": [ "Introduction to synchronization" ], "id_hash": 7772422486350892377, "content_hash": 7772422486350892377, "location": "article.translate.xml:1974", "context": "", "note": "(itstool) path: sect3/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 287, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 3, "source_unit": "https://translate-dev.freebsd.org/api/units/99684/?format=api", "priority": 100, "id": 99684, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=ebdd31123f340d59", "url": "https://translate-dev.freebsd.org/api/units/99684/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.251580Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "Threads need some kind of synchronization and <trademark class=\"registered\">POSIX</trademark> provides some of them: mutexes for mutual exclusion, read-write locks for mutual exclusion with biased ratio of reads and writes and condition variables for signaling a status change. It is interesting to note that <trademark class=\"registered\">POSIX</trademark> threading API lacks support for semaphores. Those synchronization routines implementations are heavily dependant on the type threading support we have. In pure 1:M (userspace) model the implementation can be solely done in userspace and thus be very fast (the condition variables will probably end up being implemented using signals, i.e. not fast) and simple. In 1:1 model, the situation is also quite clear - the threads must be synchronized using kernel facilities (which is very slow because a syscall must be performed). The mixed M:N scenario just combines the first and second approach or rely solely on kernel. Threads synchronization is a vital part of thread-enabled programming and its performance can affect resulting program a lot. Recent benchmarks on FreeBSD operating system showed that an improved sx_lock implementation yielded 40% speedup in <firstterm>ZFS</firstterm> (a heavy sx user), this is in-kernel stuff but it shows clearly how important the performance of synchronization primitives is." ], "previous_source": "", "target": [ "Threads need some kind of synchronization and <trademark class=\"registered\">POSIX</trademark> provides some of them: mutexes for mutual exclusion, read-write locks for mutual exclusion with biased ratio of reads and writes and condition variables for signaling a status change. It is interesting to note that <trademark class=\"registered\">POSIX</trademark> threading API lacks support for semaphores. Those synchronization routines implementations are heavily dependant on the type threading support we have. In pure 1:M (userspace) model the implementation can be solely done in userspace and thus be very fast (the condition variables will probably end up being implemented using signals, i.e. not fast) and simple. In 1:1 model, the situation is also quite clear - the threads must be synchronized using kernel facilities (which is very slow because a syscall must be performed). The mixed M:N scenario just combines the first and second approach or rely solely on kernel. Threads synchronization is a vital part of thread-enabled programming and its performance can affect resulting program a lot. Recent benchmarks on FreeBSD operating system showed that an improved sx_lock implementation yielded 40% speedup in <firstterm>ZFS</firstterm> (a heavy sx user), this is in-kernel stuff but it shows clearly how important the performance of synchronization primitives is." ], "id_hash": -5533858468812540047, "content_hash": -5533858468812540047, "location": "article.translate.xml:1976", "context": "", "note": "(itstool) path: sect3/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 288, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 198, "source_unit": "https://translate-dev.freebsd.org/api/units/99685/?format=api", "priority": 100, "id": 99685, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=3333c90ad1243771", "url": "https://translate-dev.freebsd.org/api/units/99685/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.260638Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "Futexes introduction" ], "previous_source": "", "target": [ "Futexes introduction" ], "id_hash": 6228622067454832883, "content_hash": 6228622067454832883, "location": "article.translate.xml:2008", "context": "", "note": "(itstool) path: sect3/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 290, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 2, "source_unit": "https://translate-dev.freebsd.org/api/units/99687/?format=api", "priority": 100, "id": 99687, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=d67082c50acdf0f3", "url": "https://translate-dev.freebsd.org/api/units/99687/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.288811Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "<trademark class=\"registered\">Linux</trademark> implements 1:1 threading, i.e. it has to use in-kernel synchronization primitives. As stated earlier, well written threaded programs have little lock contention. So a typical sequence could be performed as two atomic increase/decrease mutex reference counter, which is very fast, as presented by the following example:" ], "previous_source": "", "target": [ "<trademark class=\"registered\">Linux</trademark> implements 1:1 threading, i.e. it has to use in-kernel synchronization primitives. As stated earlier, well written threaded programs have little lock contention. So a typical sequence could be performed as two atomic increase/decrease mutex reference counter, which is very fast, as presented by the following example:" ], "id_hash": 3327955423491252255, "content_hash": 3327955423491252255, "location": "article.translate.xml:2010", "context": "", "note": "(itstool) path: sect3/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 291, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 48, "source_unit": "https://translate-dev.freebsd.org/api/units/99688/?format=api", "priority": 100, "id": 99688, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=ae2f45d34d87e01f", "url": "https://translate-dev.freebsd.org/api/units/99688/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.299346Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "pthread_mutex_lock(&mutex);\n....\npthread_mutex_unlock(&mutex);" ], "previous_source": "", "target": [ "pthread_mutex_lock(&mutex);\n....\npthread_mutex_unlock(&mutex);" ], "id_hash": 3837547330020178483, "content_hash": 3837547330020178483, "location": "article.translate.xml:2017", "context": "", "note": "(itstool) path: sect3/programlisting", "flags": "no-wrap", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 292, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 3, "source_unit": "https://translate-dev.freebsd.org/api/units/99689/?format=api", "priority": 100, "id": 99689, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=b541b4f6e699fa33", "url": "https://translate-dev.freebsd.org/api/units/99689/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.310629Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "1:1 threading forces us to perform two syscalls for those mutex calls, which is very slow." ], "previous_source": "", "target": [ "1:1 threading forces us to perform two syscalls for those mutex calls, which is very slow." ], "id_hash": 4595527834524327141, "content_hash": 4595527834524327141, "location": "article.translate.xml:2021", "context": "", "note": "(itstool) path: sect3/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 293, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 16, "source_unit": "https://translate-dev.freebsd.org/api/units/99690/?format=api", "priority": 100, "id": 99690, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=bfc69837a43e1ce5", "url": "https://translate-dev.freebsd.org/api/units/99690/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.322783Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "Futex API" ], "previous_source": "", "target": [ "Futex API" ], "id_hash": 2803599096756265340, "content_hash": 2803599096756265340, "location": "article.translate.xml:2033", "context": "", "note": "(itstool) path: sect3/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 295, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 2, "source_unit": "https://translate-dev.freebsd.org/api/units/99692/?format=api", "priority": 100, "id": 99692, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=a6e862863ec3617c", "url": "https://translate-dev.freebsd.org/api/units/99692/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.347878Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "The futex syscall looks like this:" ], "previous_source": "", "target": [ "The futex syscall looks like this:" ], "id_hash": -2476206495682445099, "content_hash": -2476206495682445099, "location": "article.translate.xml:2035", "context": "", "note": "(itstool) path: sect3/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 296, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 6, "source_unit": "https://translate-dev.freebsd.org/api/units/99693/?format=api", "priority": 100, "id": 99693, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=5da2bf4fca5540d5", "url": "https://translate-dev.freebsd.org/api/units/99693/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.358260Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "int futex(void *uaddr, int op, int val, struct timespec *timeout, void *uaddr2, int val3);" ], "previous_source": "", "target": [ "int futex(void *uaddr, int op, int val, struct timespec *timeout, void *uaddr2, int val3);" ], "id_hash": -2593757305794673445, "content_hash": -2593757305794673445, "location": "article.translate.xml:2037", "context": "", "note": "(itstool) path: sect3/programlisting", "flags": "no-wrap", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 297, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 14, "source_unit": "https://translate-dev.freebsd.org/api/units/99694/?format=api", "priority": 100, "id": 99694, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=5c011f790288c4db", "url": "https://translate-dev.freebsd.org/api/units/99694/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.370638Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "In this example <varname>uaddr</varname> is an address of the mutex in userspace, <varname>op</varname> is an operation we are about to perform and the other parameters have per-operation meaning." ], "previous_source": "", "target": [ "In this example <varname>uaddr</varname> is an address of the mutex in userspace, <varname>op</varname> is an operation we are about to perform and the other parameters have per-operation meaning." ], "id_hash": -8146830374926344857, "content_hash": -8146830374926344857, "location": "article.translate.xml:2039", "context": "", "note": "(itstool) path: sect3/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 298, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 28, "source_unit": "https://translate-dev.freebsd.org/api/units/99695/?format=api", "priority": 100, "id": 99695, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=0ef0a4f011271d67", "url": "https://translate-dev.freebsd.org/api/units/99695/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.382856Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "Futexes implement the following operations:" ], "previous_source": "", "target": [ "Futexes implement the following operations:" ], "id_hash": 7179240773740764902, "content_hash": 7179240773740764902, "location": "article.translate.xml:2044", "context": "", "note": "(itstool) path: sect3/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 299, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 5, "source_unit": "https://translate-dev.freebsd.org/api/units/99696/?format=api", "priority": 100, "id": 99696, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=e3a1c9724bd19ee6", "url": "https://translate-dev.freebsd.org/api/units/99696/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.392243Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "<literal>FUTEX_WAIT</literal>" ], "previous_source": "", "target": [ "<literal>FUTEX_WAIT</literal>" ], "id_hash": 4891975695687384453, "content_hash": 4891975695687384453, "location": "article.translate.xml:2048", "context": "", "note": "(itstool) path: listitem/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 300, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/99697/?format=api", "priority": 100, "id": 99697, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=c3e3c9f9f74a7d85", "url": "https://translate-dev.freebsd.org/api/units/99697/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.401750Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "<literal>FUTEX_WAKE</literal>" ], "previous_source": "", "target": [ "<literal>FUTEX_WAKE</literal>" ], "id_hash": -6071589975278023969, "content_hash": -6071589975278023969, "location": "article.translate.xml:2051", "context": "", "note": "(itstool) path: listitem/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 301, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/99698/?format=api", "priority": 100, "id": 99698, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=2bbd61160dbb0adf", "url": "https://translate-dev.freebsd.org/api/units/99698/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.410873Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "<literal>FUTEX_FD</literal>" ], "previous_source": "", "target": [ "<literal>FUTEX_FD</literal>" ], "id_hash": -4636997751606587962, "content_hash": -4636997751606587962, "location": "article.translate.xml:2054", "context": "", "note": "(itstool) path: listitem/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 302, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/99699/?format=api", "priority": 100, "id": 99699, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=3fa6131cdf344dc6", "url": "https://translate-dev.freebsd.org/api/units/99699/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.419118Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "<literal>FUTEX_REQUEUE</literal>" ], "previous_source": "", "target": [ "<literal>FUTEX_REQUEUE</literal>" ], "id_hash": 8680190209815239973, "content_hash": 8680190209815239973, "location": "article.translate.xml:2057", "context": "", "note": "(itstool) path: listitem/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 303, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/99700/?format=api", "priority": 100, "id": 99700, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=f8763b0196dc5d25", "url": "https://translate-dev.freebsd.org/api/units/99700/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.436234Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "<literal>FUTEX_CMP_REQUEUE</literal>" ], "previous_source": "", "target": [ "<literal>FUTEX_CMP_REQUEUE</literal>" ], "id_hash": 709341636577089865, "content_hash": 709341636577089865, "location": "article.translate.xml:2060", "context": "", "note": "(itstool) path: listitem/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 304, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/99701/?format=api", "priority": 100, "id": 99701, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=89d81675d0925949", "url": "https://translate-dev.freebsd.org/api/units/99701/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.445056Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "<literal>FUTEX_WAKE_OP</literal>" ], "previous_source": "", "target": [ "<literal>FUTEX_WAKE_OP</literal>" ], "id_hash": 636774616988811417, "content_hash": 636774616988811417, "location": "article.translate.xml:2063", "context": "", "note": "(itstool) path: listitem/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 305, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/99702/?format=api", "priority": 100, "id": 99702, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=88d64723ef9a8099", "url": "https://translate-dev.freebsd.org/api/units/99702/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.459791Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "FUTEX_WAIT" ], "previous_source": "", "target": [ "FUTEX_WAIT" ], "id_hash": 6646640601044491614, "content_hash": 6646640601044491614, "location": "article.translate.xml:2068", "context": "", "note": "(itstool) path: sect4/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 306, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/99703/?format=api", "priority": 100, "id": 99703, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=dc3d9c6946f21d5e", "url": "https://translate-dev.freebsd.org/api/units/99703/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.468963Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "This operation verifies that on address <varname>uaddr</varname> the value <varname>val</varname> is written. If not, <literal>EWOULDBLOCK</literal> is returned, otherwise the thread is queued on the futex and gets suspended. If the argument <varname>timeout</varname> is non-zero it specifies the maximum time for the sleeping, otherwise the sleeping is infinite." ], "previous_source": "", "target": [ "This operation verifies that on address <varname>uaddr</varname> the value <varname>val</varname> is written. If not, <literal>EWOULDBLOCK</literal> is returned, otherwise the thread is queued on the futex and gets suspended. If the argument <varname>timeout</varname> is non-zero it specifies the maximum time for the sleeping, otherwise the sleeping is infinite." ], "id_hash": 2792124385676007957, "content_hash": 2792124385676007957, "location": "article.translate.xml:2070", "context": "", "note": "(itstool) path: sect4/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 307, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 47, "source_unit": "https://translate-dev.freebsd.org/api/units/99704/?format=api", "priority": 100, "id": 99704, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=a6bf9e55e0ec9a15", "url": "https://translate-dev.freebsd.org/api/units/99704/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.483130Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "FUTEX_WAKE" ], "previous_source": "", "target": [ "FUTEX_WAKE" ], "id_hash": 4696740949745034538, "content_hash": 4696740949745034538, "location": "article.translate.xml:2081", "context": "", "note": "(itstool) path: sect4/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 308, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/99705/?format=api", "priority": 100, "id": 99705, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=c12e2d026795652a", "url": "https://translate-dev.freebsd.org/api/units/99705/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.500254Z" } ] }