Unit Instance
Units API.
See the Weblate's Web API documentation for detailed description of the API.
GET /api/units/1811682/?format=api
{ "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbooksmp_index/ru/?format=api", "source": [ "Interrupts pose a problem with regards to spin mutexes. If a low-level interrupt handler needs a lock, it needs to not interrupt any code needing that lock to avoid possible data structure corruption. Currently, providing this mechanism is piggybacked onto critical section API by means of the `cpu_critical_enter` and `cpu_critical_exit` functions. Currently this API disables and re-enables interrupts on all of FreeBSD's current platforms. This approach may not be purely optimal, but it is simple to understand and simple to get right. Theoretically, this second API need only be used for spin mutexes that are used in primary interrupt context. However, to make the code simpler, it is used for all spin mutexes and even all critical sections. It may be desirable to split out the MD API from the MI API and only use it in conjunction with the MI API in the spin mutex implementation. If this approach is taken, then the MD API likely would need a rename to show that it is a separate API." ], "previous_source": "", "target": [ "Прерывания создают проблему для спин-мьютексов. Если обработчик низкоуровневого прерывания требует блокировки, он не должен прерывать любой код, которому нужна эта блокировка, чтобы избежать возможного повреждения структур данных. В настоящее время этот механизм реализован через API критических секций с помощью функций `cpu_critical_enter` и `cpu_critical_exit`. Сейчас этот API отключает и снова включает прерывания на всех текущих платформах FreeBSD. Такой подход может быть не идеально оптимальным, но он прост для понимания и надежен в реализации. Теоретически, этот второй API нужен только для спин-мьютексов, используемых в основном контексте прерываний. Однако, для упрощения кода, он используется для всех спин-мьютексов и даже для всех критических секций. Возможно, стоит отделить MD API от MI API и использовать его только совместно с MI API в реализации спин-мьютексов. Если будет принят такой подход, то MD API, вероятно, потребуется переименовать, чтобы показать, что это отдельный API." ], "id_hash": 75582939216119995, "content_hash": 75582939216119995, "location": "documentation/content/en/books/arch-handbook/smp/_index.adoc:128", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 38, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 169, "source_unit": "https://translate-dev.freebsd.org/api/units/1134236/?format=api", "priority": 100, "id": 1811682, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbooksmp_index/ru/?checksum=810c8648630e88bb", "url": "https://translate-dev.freebsd.org/api/units/1811682/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2025-05-25T08:25:10.213820Z" }