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=7
https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/units/?format=api&page=8", "previous": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/units/?format=api&page=6", "results": [ { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "This operation takes a futex at <varname>uaddr</varname> and wakes up <varname>val</varname> first futexes queued on this futex." ], "previous_source": "", "target": [ "This operation takes a futex at <varname>uaddr</varname> and wakes up <varname>val</varname> first futexes queued on this futex." ], "id_hash": 1479727192282800167, "content_hash": 1479727192282800167, "location": "article.translate.xml:2083", "context": "", "note": "(itstool) path: sect4/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 309, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 17, "source_unit": "https://translate-dev.freebsd.org/api/units/99706/?format=api", "priority": 100, "id": 99706, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=94890c0a9c80a027", "url": "https://translate-dev.freebsd.org/api/units/99706/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.516208Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "FUTEX_FD" ], "previous_source": "", "target": [ "FUTEX_FD" ], "id_hash": -1148225787014048322, "content_hash": -1148225787014048322, "location": "article.translate.xml:2090", "context": "", "note": "(itstool) path: sect4/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 310, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/99707/?format=api", "priority": 100, "id": 99707, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=7010aebaf31595be", "url": "https://translate-dev.freebsd.org/api/units/99707/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.531036Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "This operations associates a file descriptor with a given futex." ], "previous_source": "", "target": [ "This operations associates a file descriptor with a given futex." ], "id_hash": -2684631457206744918, "content_hash": -2684631457206744918, "location": "article.translate.xml:2092", "context": "", "note": "(itstool) path: sect4/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 311, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 10, "source_unit": "https://translate-dev.freebsd.org/api/units/99708/?format=api", "priority": 100, "id": 99708, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=5abe45e9d85a48aa", "url": "https://translate-dev.freebsd.org/api/units/99708/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.542021Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "FUTEX_REQUEUE" ], "previous_source": "", "target": [ "FUTEX_REQUEUE" ], "id_hash": 5150940941445201307, "content_hash": 5150940941445201307, "location": "article.translate.xml:2097", "context": "", "note": "(itstool) path: sect4/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 312, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/99709/?format=api", "priority": 100, "id": 99709, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=c77bd17ed1db7d9b", "url": "https://translate-dev.freebsd.org/api/units/99709/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.554414Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "This operation takes <varname>val</varname> threads queued on futex at <varname>uaddr</varname>, wakes them up, and takes <varname>val2</varname> next threads and requeues them on futex at <varname>uaddr2</varname>." ], "previous_source": "", "target": [ "This operation takes <varname>val</varname> threads queued on futex at <varname>uaddr</varname>, wakes them up, and takes <varname>val2</varname> next threads and requeues them on futex at <varname>uaddr2</varname>." ], "id_hash": 5769782080566364404, "content_hash": 5769782080566364404, "location": "article.translate.xml:2099", "context": "", "note": "(itstool) path: sect4/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 313, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 25, "source_unit": "https://translate-dev.freebsd.org/api/units/99710/?format=api", "priority": 100, "id": 99710, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=d012623b8f9288f4", "url": "https://translate-dev.freebsd.org/api/units/99710/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.567036Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "FUTEX_CMP_REQUEUE" ], "previous_source": "", "target": [ "FUTEX_CMP_REQUEUE" ], "id_hash": -3722099100449871066, "content_hash": -3722099100449871066, "location": "article.translate.xml:2107", "context": "", "note": "(itstool) path: sect4/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 314, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/99711/?format=api", "priority": 100, "id": 99711, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=4c587296b2e26b26", "url": "https://translate-dev.freebsd.org/api/units/99711/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.576676Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "This operation does the same as <literal>FUTEX_REQUEUE</literal> but it checks that <varname>val3</varname> equals to <varname>val</varname> first." ], "previous_source": "", "target": [ "This operation does the same as <literal>FUTEX_REQUEUE</literal> but it checks that <varname>val3</varname> equals to <varname>val</varname> first." ], "id_hash": -3160737831016579982, "content_hash": -3160737831016579982, "location": "article.translate.xml:2109", "context": "", "note": "(itstool) path: sect4/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 315, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 16, "source_unit": "https://translate-dev.freebsd.org/api/units/99712/?format=api", "priority": 100, "id": 99712, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=5422cdb0621e3c72", "url": "https://translate-dev.freebsd.org/api/units/99712/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.586560Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "FUTEX_WAKE_OP" ], "previous_source": "", "target": [ "FUTEX_WAKE_OP" ], "id_hash": 6050201916691459304, "content_hash": 6050201916691459304, "location": "article.translate.xml:2116", "context": "", "note": "(itstool) path: sect4/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 316, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/99713/?format=api", "priority": 100, "id": 99713, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=d3f6a2967fc82ce8", "url": "https://translate-dev.freebsd.org/api/units/99713/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.603020Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "This operation performs an atomic operation on <varname>val3</varname> (which contains coded some other value) and <varname>uaddr</varname>. Then it wakes up <varname>val</varname> threads on futex at <varname>uaddr</varname> and if the atomic operation returned a positive number it wakes up <varname>val2</varname> threads on futex at <varname>uaddr2</varname>." ], "previous_source": "", "target": [ "This operation performs an atomic operation on <varname>val3</varname> (which contains coded some other value) and <varname>uaddr</varname>. Then it wakes up <varname>val</varname> threads on futex at <varname>uaddr</varname> and if the atomic operation returned a positive number it wakes up <varname>val2</varname> threads on futex at <varname>uaddr2</varname>." ], "id_hash": -2220334457643274578, "content_hash": -2220334457643274578, "location": "article.translate.xml:2118", "context": "", "note": "(itstool) path: sect4/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 317, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 44, "source_unit": "https://translate-dev.freebsd.org/api/units/99714/?format=api", "priority": 100, "id": 99714, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=612fc993199ceeae", "url": "https://translate-dev.freebsd.org/api/units/99714/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.616812Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "The operations implemented in <literal>FUTEX_WAKE_OP</literal>:" ], "previous_source": "", "target": [ "The operations implemented in <literal>FUTEX_WAKE_OP</literal>:" ], "id_hash": 2291870293036922431, "content_hash": 2291870293036922431, "location": "article.translate.xml:2127", "context": "", "note": "(itstool) path: sect4/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 318, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 5, "source_unit": "https://translate-dev.freebsd.org/api/units/99715/?format=api", "priority": 100, "id": 99715, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=9fce5be37fbc763f", "url": "https://translate-dev.freebsd.org/api/units/99715/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.623682Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "<literal>FUTEX_OP_SET</literal>" ], "previous_source": "", "target": [ "<literal>FUTEX_OP_SET</literal>" ], "id_hash": -7091212857448688372, "content_hash": -7091212857448688372, "location": "article.translate.xml:2132", "context": "", "note": "(itstool) path: listitem/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 319, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/99716/?format=api", "priority": 100, "id": 99716, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=1d96f37a1d16950c", "url": "https://translate-dev.freebsd.org/api/units/99716/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.630887Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "<literal>FUTEX_OP_ADD</literal>" ], "previous_source": "", "target": [ "<literal>FUTEX_OP_ADD</literal>" ], "id_hash": -5491281975378696549, "content_hash": -5491281975378696549, "location": "article.translate.xml:2135", "context": "", "note": "(itstool) path: listitem/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 320, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/99717/?format=api", "priority": 100, "id": 99717, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=33cb0c23300c269b", "url": "https://translate-dev.freebsd.org/api/units/99717/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.639225Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "<literal>FUTEX_OP_OR</literal>" ], "previous_source": "", "target": [ "<literal>FUTEX_OP_OR</literal>" ], "id_hash": 994945684201218501, "content_hash": 994945684201218501, "location": "article.translate.xml:2138", "context": "", "note": "(itstool) path: listitem/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 321, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/99718/?format=api", "priority": 100, "id": 99718, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=8dcec1d40d9f21c5", "url": "https://translate-dev.freebsd.org/api/units/99718/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.647546Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "<literal>FUTEX_OP_AND</literal>" ], "previous_source": "", "target": [ "<literal>FUTEX_OP_AND</literal>" ], "id_hash": -2134058569592698447, "content_hash": -2134058569592698447, "location": "article.translate.xml:2141", "context": "", "note": "(itstool) path: listitem/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 322, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/99719/?format=api", "priority": 100, "id": 99719, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=62624d09a58c89b1", "url": "https://translate-dev.freebsd.org/api/units/99719/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.660946Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "<literal>FUTEX_OP_XOR</literal>" ], "previous_source": "", "target": [ "<literal>FUTEX_OP_XOR</literal>" ], "id_hash": 8214585167031812043, "content_hash": 8214585167031812043, "location": "article.translate.xml:2144", "context": "", "note": "(itstool) path: listitem/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 323, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/99720/?format=api", "priority": 100, "id": 99720, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=f20011afca1fbfcb", "url": "https://translate-dev.freebsd.org/api/units/99720/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.670053Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "There is no <varname>val2</varname> parameter in the futex prototype. The <varname>val2</varname> is taken from the <varname>struct timespec *timeout</varname> parameter for operations <literal>FUTEX_REQUEUE</literal>, <literal>FUTEX_CMP_REQUEUE</literal> and <literal>FUTEX_WAKE_OP</literal>." ], "previous_source": "", "target": [ "There is no <varname>val2</varname> parameter in the futex prototype. The <varname>val2</varname> is taken from the <varname>struct timespec *timeout</varname> parameter for operations <literal>FUTEX_REQUEUE</literal>, <literal>FUTEX_CMP_REQUEUE</literal> and <literal>FUTEX_WAKE_OP</literal>." ], "id_hash": -2674190808617833543, "content_hash": -2674190808617833543, "location": "article.translate.xml:2149", "context": "", "note": "(itstool) path: note/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 324, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 25, "source_unit": "https://translate-dev.freebsd.org/api/units/99721/?format=api", "priority": 100, "id": 99721, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=5ae35da0c6b82bb9", "url": "https://translate-dev.freebsd.org/api/units/99721/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.679137Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "Futex emulation in FreeBSD" ], "previous_source": "", "target": [ "Futex emulation in FreeBSD" ], "id_hash": 9126050598295563048, "content_hash": 9126050598295563048, "location": "article.translate.xml:2161", "context": "", "note": "(itstool) path: sect3/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 325, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 4, "source_unit": "https://translate-dev.freebsd.org/api/units/99722/?format=api", "priority": 100, "id": 99722, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=fea63eaad1a5eb28", "url": "https://translate-dev.freebsd.org/api/units/99722/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.686510Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "The futex emulation in FreeBSD is taken from NetBSD and further extended by us. It is placed in <filename>linux_futex.c</filename> and <filename>linux_futex.h</filename> files. The <literal>futex</literal> structure looks like:" ], "previous_source": "", "target": [ "The futex emulation in FreeBSD is taken from NetBSD and further extended by us. It is placed in <filename>linux_futex.c</filename> and <filename>linux_futex.h</filename> files. The <literal>futex</literal> structure looks like:" ], "id_hash": 586376583912890399, "content_hash": 586376583912890399, "location": "article.translate.xml:2163", "context": "", "note": "(itstool) path: sect3/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 326, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 27, "source_unit": "https://translate-dev.freebsd.org/api/units/99723/?format=api", "priority": 100, "id": 99723, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=88233a6574bc201f", "url": "https://translate-dev.freebsd.org/api/units/99723/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.694359Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "struct futex {\n void *f_uaddr;\n int f_refcount;\n\n LIST_ENTRY(futex) f_list;\n\n TAILQ_HEAD(lf_waiting_paroc, waiting_proc) f_waiting_proc;\n};" ], "previous_source": "", "target": [ "struct futex {\n void *f_uaddr;\n int f_refcount;\n\n LIST_ENTRY(futex) f_list;\n\n TAILQ_HEAD(lf_waiting_paroc, waiting_proc) f_waiting_proc;\n};" ], "id_hash": 2237234486520790275, "content_hash": 2237234486520790275, "location": "article.translate.xml:2169", "context": "", "note": "(itstool) path: sect3/programlisting", "flags": "no-wrap", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 327, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 13, "source_unit": "https://translate-dev.freebsd.org/api/units/99724/?format=api", "priority": 100, "id": 99724, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=9f0c40e980533d03", "url": "https://translate-dev.freebsd.org/api/units/99724/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.724334Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "And the structure <literal>waiting_proc</literal> is:" ], "previous_source": "", "target": [ "And the structure <literal>waiting_proc</literal> is:" ], "id_hash": 4661995603563977512, "content_hash": 4661995603563977512, "location": "article.translate.xml:2178", "context": "", "note": "(itstool) path: sect3/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 328, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 5, "source_unit": "https://translate-dev.freebsd.org/api/units/99725/?format=api", "priority": 100, "id": 99725, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=c0b2bc4d16dd1b28", "url": "https://translate-dev.freebsd.org/api/units/99725/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.731547Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "struct waiting_proc {\n\n struct thread *wp_t;\n\n struct futex *wp_new_futex;\n\n TAILQ_ENTRY(waiting_proc) wp_list;\n};" ], "previous_source": "", "target": [ "struct waiting_proc {\n\n struct thread *wp_t;\n\n struct futex *wp_new_futex;\n\n TAILQ_ENTRY(waiting_proc) wp_list;\n};" ], "id_hash": 8672819089957999033, "content_hash": 8672819089957999033, "location": "article.translate.xml:2181", "context": "", "note": "(itstool) path: sect3/programlisting", "flags": "no-wrap", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 329, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 12, "source_unit": "https://translate-dev.freebsd.org/api/units/99726/?format=api", "priority": 100, "id": 99726, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=f85c0b03022c51b9", "url": "https://translate-dev.freebsd.org/api/units/99726/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.738740Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "futex_get / futex_put" ], "previous_source": "", "target": [ "futex_get / futex_put" ], "id_hash": -6923323960110814241, "content_hash": -6923323960110814241, "location": "article.translate.xml:2191", "context": "", "note": "(itstool) path: sect4/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 330, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 3, "source_unit": "https://translate-dev.freebsd.org/api/units/99727/?format=api", "priority": 100, "id": 99727, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=1feb698a24a4ebdf", "url": "https://translate-dev.freebsd.org/api/units/99727/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.745760Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "A futex is obtained using the <function>futex_get</function> function, which searches a linear list of futexes and returns the found one or creates a new futex. When releasing a futex from the use we call the <function>futex_put</function> function, which decreases a reference counter of the futex and if the refcount reaches zero it is released." ], "previous_source": "", "target": [ "A futex is obtained using the <function>futex_get</function> function, which searches a linear list of futexes and returns the found one or creates a new futex. When releasing a futex from the use we call the <function>futex_put</function> function, which decreases a reference counter of the futex and if the refcount reaches zero it is released." ], "id_hash": -2749611880161593650, "content_hash": -2749611880161593650, "location": "article.translate.xml:2193", "context": "", "note": "(itstool) path: sect4/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 331, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 54, "source_unit": "https://translate-dev.freebsd.org/api/units/99728/?format=api", "priority": 100, "id": 99728, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=59d76a9024c636ce", "url": "https://translate-dev.freebsd.org/api/units/99728/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.753051Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "futex_sleep" ], "previous_source": "", "target": [ "futex_sleep" ], "id_hash": 70305728764041886, "content_hash": 70305728764041886, "location": "article.translate.xml:2203", "context": "", "note": "(itstool) path: sect4/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 332, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/99729/?format=api", "priority": 100, "id": 99729, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=80f9c6b014a7da9e", "url": "https://translate-dev.freebsd.org/api/units/99729/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.762724Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "When a futex queues a thread for sleeping it creates a <literal>working_proc</literal> structure and puts this structure to the list inside the futex structure then it just performs a <citerefentry><refentrytitle>tsleep</refentrytitle><manvolnum>9</manvolnum></citerefentry> to suspend the thread. The sleep can be timed out. After <citerefentry><refentrytitle>tsleep</refentrytitle><manvolnum>9</manvolnum></citerefentry> returns (the thread was woken up or it timed out) the <literal>working_proc</literal> structure is removed from the list and is destroyed. All this is done in the <function>futex_sleep</function> function. If we got woken up from <function>futex_wake</function> we have <varname>wp_new_futex</varname> set so we sleep on it. This way the actual requeueing is done in this function." ], "previous_source": "", "target": [ "When a futex queues a thread for sleeping it creates a <literal>working_proc</literal> structure and puts this structure to the list inside the futex structure then it just performs a <citerefentry><refentrytitle>tsleep</refentrytitle><manvolnum>9</manvolnum></citerefentry> to suspend the thread. The sleep can be timed out. After <citerefentry><refentrytitle>tsleep</refentrytitle><manvolnum>9</manvolnum></citerefentry> returns (the thread was woken up or it timed out) the <literal>working_proc</literal> structure is removed from the list and is destroyed. All this is done in the <function>futex_sleep</function> function. If we got woken up from <function>futex_wake</function> we have <varname>wp_new_futex</varname> set so we sleep on it. This way the actual requeueing is done in this function." ], "id_hash": 5152736203726570953, "content_hash": 5152736203726570953, "location": "article.translate.xml:2205", "context": "", "note": "(itstool) path: sect4/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 333, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 97, "source_unit": "https://translate-dev.freebsd.org/api/units/99730/?format=api", "priority": 100, "id": 99730, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=c7823246e46ac5c9", "url": "https://translate-dev.freebsd.org/api/units/99730/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.770743Z" }, { "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": 5846751878596236089, "content_hash": 5846751878596236089, "location": "article.translate.xml:2221", "context": "", "note": "(itstool) path: sect4/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 334, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/99731/?format=api", "priority": 100, "id": 99731, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=d123d5db2d939339", "url": "https://translate-dev.freebsd.org/api/units/99731/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.792976Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "Waking up a thread sleeping on a futex is performed in the <function>futex_wake</function> function. First in this function we mimic the strange <trademark class=\"registered\">Linux</trademark> behavior, where it wakes up N threads for all operations, the only exception is that the REQUEUE operations are performed on N+1 threads. But this usually does not make any difference as we are waking up all threads. Next in the function in the loop we wake up n threads, after this we check if there is a new futex for requeueing. If so, we requeue up to n2 threads on the new futex. This cooperates with <function>futex_sleep</function>." ], "previous_source": "", "target": [ "Waking up a thread sleeping on a futex is performed in the <function>futex_wake</function> function. First in this function we mimic the strange <trademark class=\"registered\">Linux</trademark> behavior, where it wakes up N threads for all operations, the only exception is that the REQUEUE operations are performed on N+1 threads. But this usually does not make any difference as we are waking up all threads. Next in the function in the loop we wake up n threads, after this we check if there is a new futex for requeueing. If so, we requeue up to n2 threads on the new futex. This cooperates with <function>futex_sleep</function>." ], "id_hash": -5724434701289264366, "content_hash": -5724434701289264366, "location": "article.translate.xml:2223", "context": "", "note": "(itstool) path: sect4/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 335, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 102, "source_unit": "https://translate-dev.freebsd.org/api/units/99732/?format=api", "priority": 100, "id": 99732, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=308eb8f7f1bbeb12", "url": "https://translate-dev.freebsd.org/api/units/99732/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.804076Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "futex_wake_op" ], "previous_source": "", "target": [ "futex_wake_op" ], "id_hash": -4083058720737706903, "content_hash": -4083058720737706903, "location": "article.translate.xml:2237", "context": "", "note": "(itstool) path: sect4/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 336, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/99733/?format=api", "priority": 100, "id": 99733, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=47560fb9f95e3c69", "url": "https://translate-dev.freebsd.org/api/units/99733/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.822893Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "The <literal>FUTEX_WAKE_OP</literal> operation is quite complicated. First we obtain two futexes at addresses <varname>uaddr</varname> and <varname>uaddr2</varname> then we perform the atomic operation using <varname>val3</varname> and <varname>uaddr2</varname>. Then <varname>val</varname> waiters on the first futex is woken up and if the atomic operation condition holds we wake up <varname>val2</varname> (i.e. <varname>timeout</varname>) waiter on the second futex." ], "previous_source": "", "target": [ "The <literal>FUTEX_WAKE_OP</literal> operation is quite complicated. First we obtain two futexes at addresses <varname>uaddr</varname> and <varname>uaddr2</varname> then we perform the atomic operation using <varname>val3</varname> and <varname>uaddr2</varname>. Then <varname>val</varname> waiters on the first futex is woken up and if the atomic operation condition holds we wake up <varname>val2</varname> (i.e. <varname>timeout</varname>) waiter on the second futex." ], "id_hash": 514626612450532262, "content_hash": 514626612450532262, "location": "article.translate.xml:2239", "context": "", "note": "(itstool) path: sect4/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 337, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 54, "source_unit": "https://translate-dev.freebsd.org/api/units/99734/?format=api", "priority": 100, "id": 99734, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=8724522d6b139ba6", "url": "https://translate-dev.freebsd.org/api/units/99734/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.829321Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "futex atomic operation" ], "previous_source": "", "target": [ "futex atomic operation" ], "id_hash": 2449983155241707548, "content_hash": 2449983155241707548, "location": "article.translate.xml:2252", "context": "", "note": "(itstool) path: sect4/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 338, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 3, "source_unit": "https://translate-dev.freebsd.org/api/units/99735/?format=api", "priority": 100, "id": 99735, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=a20016b2f9df681c", "url": "https://translate-dev.freebsd.org/api/units/99735/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.835552Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "The atomic operation takes two parameters <varname>encoded_op</varname> and <varname>uaddr</varname>. The encoded operation encodes the operation itself, comparing value, operation argument, and comparing argument. The pseudocode for the operation is like this one:" ], "previous_source": "", "target": [ "The atomic operation takes two parameters <varname>encoded_op</varname> and <varname>uaddr</varname>. The encoded operation encodes the operation itself, comparing value, operation argument, and comparing argument. The pseudocode for the operation is like this one:" ], "id_hash": -6055432076951587391, "content_hash": -6055432076951587391, "location": "article.translate.xml:2254", "context": "", "note": "(itstool) path: sect4/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 339, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 32, "source_unit": "https://translate-dev.freebsd.org/api/units/99736/?format=api", "priority": 100, "id": 99736, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=2bf6c89bebcb75c1", "url": "https://translate-dev.freebsd.org/api/units/99736/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.847920Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "oldval = *uaddr2\n*uaddr2 = oldval OP oparg" ], "previous_source": "", "target": [ "oldval = *uaddr2\n*uaddr2 = oldval OP oparg" ], "id_hash": 1610897643313519905, "content_hash": 1610897643313519905, "location": "article.translate.xml:2261", "context": "", "note": "(itstool) path: sect4/programlisting", "flags": "no-wrap", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 340, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 8, "source_unit": "https://translate-dev.freebsd.org/api/units/99737/?format=api", "priority": 100, "id": 99737, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=965b0edf27375d21", "url": "https://translate-dev.freebsd.org/api/units/99737/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.866426Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "And this is done atomically. First a copying in of the number at <varname>uaddr</varname> is performed and the operation is done. The code handles page faults and if no page fault occurs <varname>oldval</varname> is compared to <varname>cmparg</varname> argument with cmp comparator." ], "previous_source": "", "target": [ "And this is done atomically. First a copying in of the number at <varname>uaddr</varname> is performed and the operation is done. The code handles page faults and if no page fault occurs <varname>oldval</varname> is compared to <varname>cmparg</varname> argument with cmp comparator." ], "id_hash": -7827306056018401216, "content_hash": -7827306056018401216, "location": "article.translate.xml:2264", "context": "", "note": "(itstool) path: sect4/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 341, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 41, "source_unit": "https://translate-dev.freebsd.org/api/units/99738/?format=api", "priority": 100, "id": 99738, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=135fd29ce6c26840", "url": "https://translate-dev.freebsd.org/api/units/99738/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.879545Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "Futex locking" ], "previous_source": "", "target": [ "Futex locking" ], "id_hash": -642655823666335864, "content_hash": -642655823666335864, "location": "article.translate.xml:2273", "context": "", "note": "(itstool) path: sect4/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 342, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 2, "source_unit": "https://translate-dev.freebsd.org/api/units/99739/?format=api", "priority": 100, "id": 99739, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=7714d3eeed882f88", "url": "https://translate-dev.freebsd.org/api/units/99739/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.891136Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "Futex implementation uses two lock lists protecting <function>sx_lock</function> and global locks (either Giant or another <function>sx_lock</function>). Every operation is performed locked from the start to the very end." ], "previous_source": "", "target": [ "Futex implementation uses two lock lists protecting <function>sx_lock</function> and global locks (either Giant or another <function>sx_lock</function>). Every operation is performed locked from the start to the very end." ], "id_hash": -6630427445303154580, "content_hash": -6630427445303154580, "location": "article.translate.xml:2275", "context": "", "note": "(itstool) path: sect4/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 343, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 28, "source_unit": "https://translate-dev.freebsd.org/api/units/99740/?format=api", "priority": 100, "id": 99740, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=23fbfd5e35b4686c", "url": "https://translate-dev.freebsd.org/api/units/99740/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.900070Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "Various syscalls implementation" ], "previous_source": "", "target": [ "Various syscalls implementation" ], "id_hash": -8480931719248773377, "content_hash": -8480931719248773377, "location": "article.translate.xml:2285", "context": "", "note": "(itstool) path: sect2/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 344, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 3, "source_unit": "https://translate-dev.freebsd.org/api/units/99741/?format=api", "priority": 100, "id": 99741, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=0a4dad8905d57eff", "url": "https://translate-dev.freebsd.org/api/units/99741/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.913907Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "In this section I am going to describe some smaller syscalls that are worth mentioning because their implementation is not obvious or those syscalls are interesting from other point of view." ], "previous_source": "", "target": [ "In this section I am going to describe some smaller syscalls that are worth mentioning because their implementation is not obvious or those syscalls are interesting from other point of view." ], "id_hash": 6065196287884272660, "content_hash": 6065196287884272660, "location": "article.translate.xml:2287", "context": "", "note": "(itstool) path: sect2/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 345, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 31, "source_unit": "https://translate-dev.freebsd.org/api/units/99742/?format=api", "priority": 100, "id": 99742, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=d42be7e3985c2414", "url": "https://translate-dev.freebsd.org/api/units/99742/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.923222Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "*at family of syscalls" ], "previous_source": "", "target": [ "*at family of syscalls" ], "id_hash": 7281600055271721241, "content_hash": 7281600055271721241, "location": "article.translate.xml:2293", "context": "", "note": "(itstool) path: sect3/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 346, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 4, "source_unit": "https://translate-dev.freebsd.org/api/units/99743/?format=api", "priority": 100, "id": 99743, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=e50d70abb2ef8919", "url": "https://translate-dev.freebsd.org/api/units/99743/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.933049Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "During development of <trademark class=\"registered\">Linux</trademark> 2.6.16 kernel, the *at syscalls were added. Those syscalls (<function>openat</function> for example) work exactly like their at-less counterparts with the slight exception of the <varname>dirfd</varname> parameter. This parameter changes where the given file, on which the syscall is to be performed, is. When the <varname>filename</varname> parameter is absolute <varname>dirfd</varname> is ignored but when the path to the file is relative, it comes to the play. The <varname>dirfd</varname> parameter is a directory relative to which the relative pathname is checked. The <varname>dirfd</varname> parameter is a file descriptor of some directory or <literal>AT_FDCWD</literal>. So for example the <function>openat</function> syscall can be like this:" ], "previous_source": "", "target": [ "During development of <trademark class=\"registered\">Linux</trademark> 2.6.16 kernel, the *at syscalls were added. Those syscalls (<function>openat</function> for example) work exactly like their at-less counterparts with the slight exception of the <varname>dirfd</varname> parameter. This parameter changes where the given file, on which the syscall is to be performed, is. When the <varname>filename</varname> parameter is absolute <varname>dirfd</varname> is ignored but when the path to the file is relative, it comes to the play. The <varname>dirfd</varname> parameter is a directory relative to which the relative pathname is checked. The <varname>dirfd</varname> parameter is a file descriptor of some directory or <literal>AT_FDCWD</literal>. So for example the <function>openat</function> syscall can be like this:" ], "id_hash": -5681989922173146544, "content_hash": -5681989922173146544, "location": "article.translate.xml:2295", "context": "", "note": "(itstool) path: sect3/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 347, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 106, "source_unit": "https://translate-dev.freebsd.org/api/units/99744/?format=api", "priority": 100, "id": 99744, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=312584452f852a50", "url": "https://translate-dev.freebsd.org/api/units/99744/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.940727Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "file descriptor 123 = /tmp/foo/, current working directory = /tmp/\n\nopenat(123, /tmp/bah\\, flags, mode)\t/* opens /tmp/bah */\nopenat(123, bah\\, flags, mode)\t\t/* opens /tmp/foo/bah */\nopenat(AT_FDWCWD, bah\\, flags, mode)\t/* opens /tmp/bah */\nopenat(stdio, bah\\, flags, mode)\t/* returns error because stdio is not a directory */" ], "previous_source": "", "target": [ "file descriptor 123 = /tmp/foo/, current working directory = /tmp/\n\nopenat(123, /tmp/bah\\, flags, mode)\t/* opens /tmp/bah */\nopenat(123, bah\\, flags, mode)\t\t/* opens /tmp/foo/bah */\nopenat(AT_FDWCWD, bah\\, flags, mode)\t/* opens /tmp/bah */\nopenat(stdio, bah\\, flags, mode)\t/* returns error because stdio is not a directory */" ], "id_hash": -7628508882524156093, "content_hash": -7628508882524156093, "location": "article.translate.xml:2311", "context": "", "note": "(itstool) path: sect3/programlisting", "flags": "no-wrap", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 348, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 48, "source_unit": "https://translate-dev.freebsd.org/api/units/99745/?format=api", "priority": 100, "id": 99745, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=16221796c33c4f43", "url": "https://translate-dev.freebsd.org/api/units/99745/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.953326Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "<trademark class=\"registered\">Linux</trademark> family of *at syscalls contains: <function>linux_openat</function>, <function>linux_mkdirat</function>, <function>linux_mknodat</function>, <function>linux_fchownat</function>, <function>linux_futimesat</function>, <function>linux_fstatat64</function>, <function>linux_unlinkat</function>, <function>linux_renameat</function>, <function>linux_linkat</function>, <function>linux_symlinkat</function>, <function>linux_readlinkat</function>, <function>linux_fchmodat</function> and <function>linux_faccessat</function>. All these are implemented using the modified <citerefentry><refentrytitle>namei</refentrytitle><manvolnum>9</manvolnum></citerefentry> routine and simple wrapping layer." ], "previous_source": "", "target": [ "<trademark class=\"registered\">Linux</trademark> family of *at syscalls contains: <function>linux_openat</function>, <function>linux_mkdirat</function>, <function>linux_mknodat</function>, <function>linux_fchownat</function>, <function>linux_futimesat</function>, <function>linux_fstatat64</function>, <function>linux_unlinkat</function>, <function>linux_renameat</function>, <function>linux_linkat</function>, <function>linux_symlinkat</function>, <function>linux_readlinkat</function>, <function>linux_fchmodat</function> and <function>linux_faccessat</function>. All these are implemented using the modified <citerefentry><refentrytitle>namei</refentrytitle><manvolnum>9</manvolnum></citerefentry> routine and simple wrapping layer." ], "id_hash": -8174028981051945541, "content_hash": -8174028981051945541, "location": "article.translate.xml:2332", "context": "", "note": "(itstool) path: sect3/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 350, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 34, "source_unit": "https://translate-dev.freebsd.org/api/units/99747/?format=api", "priority": 100, "id": 99747, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=0e9003f318a68dbb", "url": "https://translate-dev.freebsd.org/api/units/99747/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:41.984651Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "Implementation" ], "previous_source": "", "target": [ "Implementation" ], "id_hash": 5056126522401168332, "content_hash": 5056126522401168332, "location": "article.translate.xml:2350", "context": "", "note": "(itstool) path: sect4/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 351, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/99748/?format=api", "priority": 100, "id": 99748, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=c62af8489b271bcc", "url": "https://translate-dev.freebsd.org/api/units/99748/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:42.008169Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "The implementation is done by altering the <citerefentry><refentrytitle>namei</refentrytitle><manvolnum>9</manvolnum></citerefentry> routine (described above) to take additional parameter <varname>dirfd</varname> in its <literal>nameidata</literal> structure, which specifies the starting point of the pathname lookup instead of using the current working directory every time. The resolution of <varname>dirfd</varname> from file descriptor number to a vnode is done in native *at syscalls. When <varname>dirfd</varname> is <literal>AT_FDCWD</literal> the <varname>dvp</varname> entry in <literal>nameidata</literal> structure is <literal>NULL</literal> but when <varname>dirfd</varname> is a different number we obtain a file for this file descriptor, check whether this file is valid and if there is vnode attached to it then we get a vnode. Then we check this vnode for being a directory. In the actual <citerefentry><refentrytitle>namei</refentrytitle><manvolnum>9</manvolnum></citerefentry> routine we simply substitute the <varname>dvp</varname> vnode for <varname>dp</varname> variable in the <citerefentry><refentrytitle>namei</refentrytitle><manvolnum>9</manvolnum></citerefentry> function, which determines the starting point. The <citerefentry><refentrytitle>namei</refentrytitle><manvolnum>9</manvolnum></citerefentry> is not used directly but via a trace of different functions on various levels. For example the <function>openat</function> goes like this:" ], "previous_source": "", "target": [ "The implementation is done by altering the <citerefentry><refentrytitle>namei</refentrytitle><manvolnum>9</manvolnum></citerefentry> routine (described above) to take additional parameter <varname>dirfd</varname> in its <literal>nameidata</literal> structure, which specifies the starting point of the pathname lookup instead of using the current working directory every time. The resolution of <varname>dirfd</varname> from file descriptor number to a vnode is done in native *at syscalls. When <varname>dirfd</varname> is <literal>AT_FDCWD</literal> the <varname>dvp</varname> entry in <literal>nameidata</literal> structure is <literal>NULL</literal> but when <varname>dirfd</varname> is a different number we obtain a file for this file descriptor, check whether this file is valid and if there is vnode attached to it then we get a vnode. Then we check this vnode for being a directory. In the actual <citerefentry><refentrytitle>namei</refentrytitle><manvolnum>9</manvolnum></citerefentry> routine we simply substitute the <varname>dvp</varname> vnode for <varname>dp</varname> variable in the <citerefentry><refentrytitle>namei</refentrytitle><manvolnum>9</manvolnum></citerefentry> function, which determines the starting point. The <citerefentry><refentrytitle>namei</refentrytitle><manvolnum>9</manvolnum></citerefentry> is not used directly but via a trace of different functions on various levels. For example the <function>openat</function> goes like this:" ], "id_hash": -4832494671521998248, "content_hash": -4832494671521998248, "location": "article.translate.xml:2352", "context": "", "note": "(itstool) path: sect4/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 352, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 156, "source_unit": "https://translate-dev.freebsd.org/api/units/99749/?format=api", "priority": 100, "id": 99749, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=3cef87b32cf69a58", "url": "https://translate-dev.freebsd.org/api/units/99749/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:42.022620Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "openat() --> kern_openat() --> vn_open() -> namei()" ], "previous_source": "", "target": [ "openat() --> kern_openat() --> vn_open() -> namei()" ], "id_hash": -1140226309914472041, "content_hash": -1140226309914472041, "location": "article.translate.xml:2376", "context": "", "note": "(itstool) path: sect4/programlisting", "flags": "no-wrap", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 353, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 7, "source_unit": "https://translate-dev.freebsd.org/api/units/99750/?format=api", "priority": 100, "id": 99750, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=702d1a3659fe5197", "url": "https://translate-dev.freebsd.org/api/units/99750/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:42.030564Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "For this reason <function>kern_open</function> and <function>vn_open</function> must be altered to incorporate the additional <varname>dirfd</varname> parameter. No compat layer is created for those because there are not many users of this and the users can be easily converted. This general implementation enables FreeBSD to implement their own *at syscalls. This is being discussed right now." ], "previous_source": "", "target": [ "For this reason <function>kern_open</function> and <function>vn_open</function> must be altered to incorporate the additional <varname>dirfd</varname> parameter. No compat layer is created for those because there are not many users of this and the users can be easily converted. This general implementation enables FreeBSD to implement their own *at syscalls. This is being discussed right now." ], "id_hash": 2829532767042601423, "content_hash": 2829532767042601423, "location": "article.translate.xml:2378", "context": "", "note": "(itstool) path: sect4/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 354, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 54, "source_unit": "https://translate-dev.freebsd.org/api/units/99751/?format=api", "priority": 100, "id": 99751, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=a744850f63e701cf", "url": "https://translate-dev.freebsd.org/api/units/99751/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:42.042918Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "Ioctl" ], "previous_source": "", "target": [ "Ioctl" ], "id_hash": -7931515274902344740, "content_hash": -7931515274902344740, "location": "article.translate.xml:2390", "context": "", "note": "(itstool) path: sect3/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 355, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/99752/?format=api", "priority": 100, "id": 99752, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=11ed98e164dc6bdc", "url": "https://translate-dev.freebsd.org/api/units/99752/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:42.058422Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "Every syscall should be debuggable. For this purpose we introduce a small infrastructure. We have the ldebug facility, which tells whether a given syscall should be debugged (settable via a sysctl). For printing we have LMSG and ARGS macros. Those are used for altering a printable string for uniform debugging messages." ], "previous_source": "", "target": [ "Every syscall should be debuggable. For this purpose we introduce a small infrastructure. We have the ldebug facility, which tells whether a given syscall should be debugged (settable via a sysctl). For printing we have LMSG and ARGS macros. Those are used for altering a printable string for uniform debugging messages." ], "id_hash": 545499782934865652, "content_hash": 545499782934865652, "location": "article.translate.xml:2424", "context": "", "note": "(itstool) path: sect3/para", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 358, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 51, "source_unit": "https://translate-dev.freebsd.org/api/units/99754/?format=api", "priority": 100, "id": 99754, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=8792012992e2a6f4", "url": "https://translate-dev.freebsd.org/api/units/99754/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:42.081303Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "Conclusion" ], "previous_source": "", "target": [ "Conclusion" ], "id_hash": -438954553492005104, "content_hash": -438954553492005104, "location": "article.translate.xml:2435", "context": "", "note": "(itstool) path: sect1/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 359, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/99755/?format=api", "priority": 100, "id": 99755, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=79e88528c6919f10", "url": "https://translate-dev.freebsd.org/api/units/99755/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:42.088146Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "Results" ], "previous_source": "", "target": [ "Results" ], "id_hash": -5105057664626298816, "content_hash": -5105057664626298816, "location": "article.translate.xml:2438", "context": "", "note": "(itstool) path: sect2/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 360, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/99756/?format=api", "priority": 100, "id": 99756, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=3927311a0e107040", "url": "https://translate-dev.freebsd.org/api/units/99756/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:42.095135Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/freebsd-doc/articles_linux-emulation/en/?format=api", "source": [ "Future work" ], "previous_source": "", "target": [ "Future work" ], "id_hash": 4787331879594147589, "content_hash": 4787331879594147589, "location": "article.translate.xml:2474", "context": "", "note": "(itstool) path: sect2/title", "flags": "", "labels": [], "state": 100, "fuzzy": false, "translated": true, "approved": false, "position": 364, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 2, "source_unit": "https://translate-dev.freebsd.org/api/units/99759/?format=api", "priority": 100, "id": 99759, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/articles_linux-emulation/en/?checksum=c27004fae91cbf05", "url": "https://translate-dev.freebsd.org/api/units/99759/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:10:42.155044Z" } ] }{ "count": 384, "next": "