diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:43:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:43:11 +0000 |
commit | fc22b3d6507c6745911b9dfcc68f1e665ae13dbc (patch) | |
tree | ce1e3bce06471410239a6f41282e328770aa404a /po/ru/man3/pthread_create.3.po | |
parent | Initial commit. (diff) | |
download | manpages-l10n-fc22b3d6507c6745911b9dfcc68f1e665ae13dbc.tar.xz manpages-l10n-fc22b3d6507c6745911b9dfcc68f1e665ae13dbc.zip |
Adding upstream version 4.22.0.upstream/4.22.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'po/ru/man3/pthread_create.3.po')
-rw-r--r-- | po/ru/man3/pthread_create.3.po | 1335 |
1 files changed, 1335 insertions, 0 deletions
diff --git a/po/ru/man3/pthread_create.3.po b/po/ru/man3/pthread_create.3.po new file mode 100644 index 00000000..4bc59443 --- /dev/null +++ b/po/ru/man3/pthread_create.3.po @@ -0,0 +1,1335 @@ +# Russian translation of manpages +# This file is distributed under the same license as the manpages-l10n package. +# Copyright © of this file: +# Alexey, 2016. +# Azamat Hackimov <azamat.hackimov@gmail.com>, 2014-2017. +# kogamatranslator49 <r.podarov@yandex.ru>, 2015. +# Kogan, Darima <silverdk99@gmail.com>, 2014. +# Max Is <ismax799@gmail.com>, 2016. +# Yuri Kozlov <yuray@komyakino.ru>, 2011-2019. +# Иван Павлов <pavia00@gmail.com>, 2017. +msgid "" +msgstr "" +"Project-Id-Version: manpages-l10n\n" +"POT-Creation-Date: 2024-03-01 17:04+0100\n" +"PO-Revision-Date: 2019-10-12 08:58+0300\n" +"Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n" +"Language-Team: Russian <man-pages-ru-talks@lists.sourceforge.net>\n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || " +"(n%100>=11 && n%100<=14)? 2 : 3);\n" +"X-Generator: Lokalize 2.0\n" + +#. type: TH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, fuzzy, no-wrap +#| msgid "B<pthread_create>()" +msgid "pthread_create" +msgstr "B<pthread_create>()" + +#. type: TH +#: archlinux fedora-40 fedora-rawhide mageia-cauldron +#, no-wrap +msgid "2024-02-12" +msgstr "12 февраля 2024 г." + +#. type: TH +#: archlinux fedora-40 fedora-rawhide mageia-cauldron +#, no-wrap +msgid "Linux man-pages 6.06" +msgstr "Linux man-pages 6.06" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "NAME" +msgstr "ИМЯ" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "pthread_create - create a new thread" +msgstr "pthread_create - создаёт новую нить" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "LIBRARY" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "POSIX threads library (I<libpthread>, I<-lpthread>)" +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "SYNOPSIS" +msgstr "СИНТАКСИС" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "B<#include E<lt>pthread.hE<gt>>\n" +msgstr "B<#include E<lt>pthread.hE<gt>>\n" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, fuzzy, no-wrap +#| msgid "" +#| "B<int pthread_create(pthread_t *>I<thread>B<, const pthread_attr_t *>I<attr>B<,>\n" +#| "B< void *(*>I<start_routine>B<) (void *), void *>I<arg>B<);>\n" +msgid "" +"B<int pthread_create(pthread_t *restrict >I<thread>B<,>\n" +"B< const pthread_attr_t *restrict >I<attr>B<,>\n" +"B< void *(*>I<start_routine>B<)(void *),>\n" +"B< void *restrict >I<arg>B<);>\n" +msgstr "" +"B<int pthread_create(pthread_t *>I<thread>B<, const pthread_attr_t *>I<attr>B<,>\n" +"B< void *(*>I<start_routine>B<) (void *), void *>I<arg>B<);>\n" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "DESCRIPTION" +msgstr "ОПИСАНИЕ" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The B<pthread_create>() function starts a new thread in the calling " +"process. The new thread starts execution by invoking I<start_routine>(); " +"I<arg> is passed as the sole argument of I<start_routine>()." +msgstr "" +"Функция B<pthread_create>() запускает новую нить в вызвавшем процессе. Новая " +"нить начинает выполнение вызовом I<start_routine>(); значение I<arg> " +"является единственным аргументом I<start_routine>()." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "The new thread terminates in one of the following ways:" +msgstr "Новая нить завершает работу в одном из следующих случаев:" + +#. type: IP +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "\\[bu]" +msgstr "\\[bu]" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"It calls B<pthread_exit>(3), specifying an exit status value that is " +"available to another thread in the same process that calls " +"B<pthread_join>(3)." +msgstr "" +"Она вызывает B<pthread_exit>(3), указывая код выхода, доступное другой нити " +"в том же процессе, вызвавшей B<pthread_join>(3)." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"It returns from I<start_routine>(). This is equivalent to calling " +"B<pthread_exit>(3) with the value supplied in the I<return> statement." +msgstr "" +"При возврате из I<start_routine>(). Это эквивалентно вызову " +"B<pthread_exit>(3) со значением, переданным в операторе I<return>." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "It is canceled (see B<pthread_cancel>(3))." +msgstr "При её отмене (смотрите B<pthread_cancel>(3))." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"Any of the threads in the process calls B<exit>(3), or the main thread " +"performs a return from I<main>(). This causes the termination of all " +"threads in the process." +msgstr "" +"При вызове из любой нити процесса функции B<exit>(3), или если главная нить " +"выполняет возврат из I<main>(). Это вызывает завершение всех нитей процесса." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The I<attr> argument points to a I<pthread_attr_t> structure whose contents " +"are used at thread creation time to determine attributes for the new thread; " +"this structure is initialized using B<pthread_attr_init>(3) and related " +"functions. If I<attr> is NULL, then the thread is created with default " +"attributes." +msgstr "" +"Аргумент I<attr> указывает на структуру I<pthread_attr_t>, чьё содержимое " +"используется при создании нити для определения атрибутов новой нити; эта " +"структура инициализируется с помощью B<pthread_attr_init>(3) и подобными " +"функциями. Если значение I<attr> равно NULL, то нити создаётся с атрибутами " +"по умолчанию." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"Before returning, a successful call to B<pthread_create>() stores the ID of " +"the new thread in the buffer pointed to by I<thread>; this identifier is " +"used to refer to the thread in subsequent calls to other pthreads functions." +msgstr "" +"Перед возвратом успешный вызов B<pthread_create>() сохраняет ID новой нити в " +"буфер, на который указывает I<thread>; этот идентификатор используется для " +"ссылки на нить в последующих вызовах других функций pthreads." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The new thread inherits a copy of the creating thread's signal mask " +"(B<pthread_sigmask>(3)). The set of pending signals for the new thread is " +"empty (B<sigpending>(2)). The new thread does not inherit the creating " +"thread's alternate signal stack (B<sigaltstack>(2))." +msgstr "" +"Новая нить наследует копию сигнальной маски создавшей нити " +"(B<pthread_sigmask>(3)). Набор ожидающих сигналов новой нити пуст " +"(B<sigpending>(2)). Новая нить не наследует альтернативный стек сигналов " +"создавшей нити (B<sigaltstack>(2))." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The new thread inherits the calling thread's floating-point environment " +"(B<fenv>(3))." +msgstr "" +"Новая нить наследует окружение плавающей запятой вызвавшей нити (B<fenv>(3))." + +#. CLOCK_THREAD_CPUTIME_ID in clock_gettime(2) +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The initial value of the new thread's CPU-time clock is 0 (see " +"B<pthread_getcpuclockid>(3))." +msgstr "" +"Начальное значение часов ЦП новой нити равно 0 (смотрите " +"B<pthread_getcpuclockid>(3))." + +#. type: SS +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Linux-specific details" +msgstr "Информация, касающаяся только Linux" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The new thread inherits copies of the calling thread's capability sets (see " +"B<capabilities>(7)) and CPU affinity mask (see B<sched_setaffinity>(2))." +msgstr "" +"Новая нить наследует копию набора мандатов вызвавшей нити (смотрите " +"B<capabilities>(7)) и маску увязывания ЦП (смотрите B<sched_setaffinity>(2))." + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "RETURN VALUE" +msgstr "ВОЗВРАЩАЕМОЕ ЗНАЧЕНИЕ" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"On success, B<pthread_create>() returns 0; on error, it returns an error " +"number, and the contents of I<*thread> are undefined." +msgstr "" +"При успешном выполнении B<pthread_create>() возвращается 0; при ошибке " +"возвращается номер ошибки, а содержимое I<*thread> не определено." + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "ERRORS" +msgstr "ОШИБКИ" + +#. type: TP +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "B<EAGAIN>" +msgstr "B<EAGAIN>" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "Insufficient resources to create another thread." +msgstr "Недостаточно ресурсов для создания другой нити." + +#. NOTE! The following should match the description in fork(2) +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"A system-imposed limit on the number of threads was encountered. There are " +"a number of limits that may trigger this error: the B<RLIMIT_NPROC> soft " +"resource limit (set via B<setrlimit>(2)), which limits the number of " +"processes and threads for a real user ID, was reached; the kernel's system-" +"wide limit on the number of processes and threads, I</proc/sys/kernel/" +"threads-max>, was reached (see B<proc>(5)); or the maximum number of PIDs, " +"I</proc/sys/kernel/pid_max>, was reached (see B<proc>(5))." +msgstr "" +"Возникло системного ограничение на количество нитей. Есть несколько " +"ограничений, которые могут вызвать эту ошибку: был достигнут мягкий " +"ограничитель B<RLIMIT_NPROC> (задаётся с помощью B<setrlimit>(2)), который " +"ограничивает количество процессов и ните для реального ID пользователя; был " +"достигнут ядерный системный ограничитель на количество процессов и нитей, I</" +"proc/sys/kernel/threads-max> (смотрите B<proc>(5)); был достигнуто " +"максимальное количество PID, I</proc/sys/kernel/pid_max> (смотрите " +"B<proc>(5))." + +#. type: TP +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "B<EINVAL>" +msgstr "B<EINVAL>" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "Invalid settings in I<attr>." +msgstr "Некорректные значения в I<attr>." + +#. FIXME . Test the following +#. type: TP +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "B<EPERM>" +msgstr "B<EPERM>" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"No permission to set the scheduling policy and parameters specified in " +"I<attr>." +msgstr "" +"Нет прав на изменение алгоритма планирования и параметров, указанных в " +"I<attr>." + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "ATTRIBUTES" +msgstr "АТРИБУТЫ" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"For an explanation of the terms used in this section, see B<attributes>(7)." +msgstr "Описание терминов данного раздела смотрите в B<attributes>(7)." + +#. type: tbl table +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Interface" +msgstr "Интерфейс" + +#. type: tbl table +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Attribute" +msgstr "Атрибут" + +#. type: tbl table +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Value" +msgstr "Значение" + +#. type: tbl table +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-tumbleweed +#, no-wrap +msgid ".na\n" +msgstr ".na\n" + +#. type: tbl table +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-tumbleweed +#, no-wrap +msgid ".nh\n" +msgstr ".nh\n" + +#. type: tbl table +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "B<pthread_create>()" +msgstr "B<pthread_create>()" + +#. type: tbl table +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Thread safety" +msgstr "Безвредность в нитях" + +#. type: tbl table +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "MT-Safe" +msgstr "MT-Safe" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "STANDARDS" +msgstr "СТАНДАРТЫ" + +#. type: Plain text +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-leap-15-6 opensuse-tumbleweed +msgid "POSIX.1-2008." +msgstr "POSIX.1-2008." + +#. type: SH +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "HISTORY" +msgstr "ИСТОРИЯ" + +#. type: Plain text +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-leap-15-6 opensuse-tumbleweed +msgid "POSIX.1-2001." +msgstr "POSIX.1-2001." + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "NOTES" +msgstr "ЗАМЕЧАНИЯ" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, fuzzy +#| msgid "" +#| "See B<pthread_self>(3) for further information on the thread ID returned " +#| "in I<*thread> by B<pthread_create>(). Unless real-time scheduling " +#| "policies are being employed, after a call to B<pthread_create>(), it is " +#| "indeterminate which thread\\(emthe caller or the new thread\\(emwill next " +#| "execute." +msgid "" +"See B<pthread_self>(3) for further information on the thread ID returned in " +"I<*thread> by B<pthread_create>(). Unless real-time scheduling policies are " +"being employed, after a call to B<pthread_create>(), it is indeterminate " +"which thread\\[em]the caller or the new thread\\[em]will next execute." +msgstr "" +"Дополнительную информацию об идентификаторе нити, возвращаемом " +"B<pthread_create>() в I<*thread> смотрите в B<pthread_self>(3). Если не " +"используются алгоритмы планирования реального времени после вызова " +"B<pthread_create>() невозможно сказать какая нить — создавшая или новая — " +"будет выполняться далее первой." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"A thread may either be I<joinable> or I<detached>. If a thread is joinable, " +"then another thread can call B<pthread_join>(3) to wait for the thread to " +"terminate and fetch its exit status. Only when a terminated joinable thread " +"has been joined are the last of its resources released back to the system. " +"When a detached thread terminates, its resources are automatically released " +"back to the system: it is not possible to join with the thread in order to " +"obtain its exit status. Making a thread detached is useful for some types " +"of daemon threads whose exit status the application does not need to care " +"about. By default, a new thread is created in a joinable state, unless " +"I<attr> was set to create the thread in a detached state (using " +"B<pthread_attr_setdetachstate>(3))." +msgstr "" +"Нить может быть I<присоединяема> (joinable) или I<отключённой> (detached). " +"Если нить присоединяема, то другая нить может вызвать B<pthread_join>(3) для " +"ожидания завершения нити и получения её кода выхода. Освобождение ресурсов " +"обратно в систему у завершённой присоединяемой нити происходит только после " +"её присоединения. При завершении отключённой нити, её ресурсы автоматически " +"освобождаются обратно в систему: к ней невозможно присоединиться для " +"получения её кода выхода. Создание отключённых нитей полезно в некоторых " +"типах служебных нитей, чей код выхода не нужен приложению. По умолчанию " +"новая нить создаётся в присоединяемом состоянии, если в I<attr> не указано " +"создание нити в отключённом состоянии (с помощью " +"B<pthread_attr_setdetachstate>(3))." + +#. type: Plain text +#: archlinux fedora-40 fedora-rawhide mageia-cauldron +#, fuzzy +#| msgid "" +#| "Under the NPTL threading implementation, if the B<RLIMIT_STACK> soft " +#| "resource limit I<at the time the program started> has any value other " +#| "than \"unlimited\", then it determines the default stack size of new " +#| "threads. Using B<pthread_attr_setstacksize>(3), the stack size attribute " +#| "can be explicitly set in the I<attr> argument used to create a thread, in " +#| "order to obtain a stack size other than the default. If the " +#| "B<RLIMIT_STACK> resource limit is set to \"unlimited\", a per-" +#| "architecture value is used for the stack size. Here is the value for a " +#| "few architectures:" +msgid "" +"Under the NPTL threading implementation, if the B<RLIMIT_STACK> soft " +"resource limit I<at the time the program started> has any value other than " +"\"unlimited\", then it determines the default stack size of new threads. " +"Using B<pthread_attr_setstacksize>(3), the stack size attribute can be " +"explicitly set in the I<attr> argument used to create a thread, in order to " +"obtain a stack size other than the default. If the B<RLIMIT_STACK> resource " +"limit is set to \"unlimited\", a per-architecture value is used for the " +"stack size: 2 MB on most architectures; 4 MB on POWER and Sparc-64." +msgstr "" +"В реализации нитей NPTL, если мягкое ограничение ресурса B<RLIMIT_STACK> " +"I<в момент запуска программы> не равно «unlimited», то им задаётся размер " +"стека по умолчанию для новых нитей. Чтобы получить размер стека, отличный от " +"умолчательного при создании новой нити, можно изменить атрибут размера стека " +"в аргументе I<attr> с помощью B<pthread_attr_setstacksize>(3). Если ресурс " +"B<RLIMIT_STACK> равен «unlimited», то для размера используется значение, " +"определённое для архитектуры. Вот значения для некоторых архитектур:" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "BUGS" +msgstr "ДЕФЕКТЫ" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"In the obsolete LinuxThreads implementation, each of the threads in a " +"process has a different process ID. This is in violation of the POSIX " +"threads specification, and is the source of many other nonconformances to " +"the standard; see B<pthreads>(7)." +msgstr "" +"В устаревшей реализации LinuxThreads каждая нить процесса имеет свой " +"неодинаковый ID процесса. Это нарушает спецификацию нитей POSIX и является " +"источником многих других несоответствий стандарту; смотрите B<pthreads>(7)." + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "EXAMPLES" +msgstr "ПРИМЕРЫ" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"The program below demonstrates the use of B<pthread_create>(), as well as a " +"number of other functions in the pthreads API." +msgstr "" +"Представленная ниже программа показывает использование B<pthread_create>(), " +"а также других функций программного интерфейса pthreads." + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"In the following run, on a system providing the NPTL threading " +"implementation, the stack size defaults to the value given by the \"stack " +"size\" resource limit:" +msgstr "" +"В этом сеансе в системе с реализацией нитей NPTL размер стека по умолчанию " +"берётся из значения ограничения ресурса на «размер стека»:" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "" +"$B< ulimit -s>\n" +"8192 # The stack size limit is 8 MB (0x800000 bytes)\n" +"$B< ./a.out hola salut servus>\n" +"Thread 1: top of stack near 0xb7dd03b8; argv_string=hola\n" +"Thread 2: top of stack near 0xb75cf3b8; argv_string=salut\n" +"Thread 3: top of stack near 0xb6dce3b8; argv_string=servus\n" +"Joined with thread 1; returned value was HOLA\n" +"Joined with thread 2; returned value was SALUT\n" +"Joined with thread 3; returned value was SERVUS\n" +msgstr "" +"$B< ulimit -s>\n" +"8192 # ограничение на размер стека 8 МБ (0x800000 байт)\n" +"$B< ./a.out hola salut servus>\n" +"Нить 1: вершина стека около 0xb7dd03b8; argv_string=hola\n" +"Нить 2: вершина стека около 0xb75cf3b8; argv_string=salut\n" +"Нить 3: вершина стека около 0xb6dce3b8; argv_string=servus\n" +"Присоединение нити 1; получено значение возврата HOLA\n" +"Присоединение нити 2; получено значение возврата SALUT\n" +"Присоединение нити 3; получено значение возврата SERVUS\n" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"In the next run, the program explicitly sets a stack size of 1\\ MB (using " +"B<pthread_attr_setstacksize>(3)) for the created threads:" +msgstr "" +"В этом сеансе программа явно устанавливает размер стека в 1\\ МБ (с помощью " +"B<pthread_attr_setstacksize>(3)) для создаваемых нитей:" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "" +"$B< ./a.out -s 0x100000 hola salut servus>\n" +"Thread 1: top of stack near 0xb7d723b8; argv_string=hola\n" +"Thread 2: top of stack near 0xb7c713b8; argv_string=salut\n" +"Thread 3: top of stack near 0xb7b703b8; argv_string=servus\n" +"Joined with thread 1; returned value was HOLA\n" +"Joined with thread 2; returned value was SALUT\n" +"Joined with thread 3; returned value was SERVUS\n" +msgstr "" +"$B< ./a.out -s 0x100000 hola salut servus>\n" +"Нить 1: вершина стека около 0xb7d723b8; argv_string=hola\n" +"Нить 2: вершина стека около 0xb7c713b8; argv_string=salut\n" +"Нить 3: вершина стека около 0xb7b703b8; argv_string=servus\n" +"Присоединение нити 1; получено значение возврата HOLA\n" +"Присоединение нити 2; получено значение возврата SALUT\n" +"Присоединение нити 3; получено значение возврата SERVUS\n" + +#. type: SS +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Program source" +msgstr "Исходный код программы" + +#. type: Plain text +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-tumbleweed +#, no-wrap +msgid "" +"#include E<lt>ctype.hE<gt>\n" +"#include E<lt>errno.hE<gt>\n" +"#include E<lt>pthread.hE<gt>\n" +"#include E<lt>stdio.hE<gt>\n" +"#include E<lt>stdlib.hE<gt>\n" +"#include E<lt>string.hE<gt>\n" +"#include E<lt>unistd.hE<gt>\n" +"\\&\n" +"#define handle_error_en(en, msg) \\e\n" +" do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n" +"\\&\n" +"#define handle_error(msg) \\e\n" +" do { perror(msg); exit(EXIT_FAILURE); } while (0)\n" +"\\&\n" +"struct thread_info { /* Used as argument to thread_start() */\n" +" pthread_t thread_id; /* ID returned by pthread_create() */\n" +" int thread_num; /* Application-defined thread # */\n" +" char *argv_string; /* From command-line argument */\n" +"};\n" +"\\&\n" +"/* Thread start function: display address near top of our stack,\n" +" and return upper-cased copy of argv_string. */\n" +"\\&\n" +"static void *\n" +"thread_start(void *arg)\n" +"{\n" +" struct thread_info *tinfo = arg;\n" +" char *uargv;\n" +"\\&\n" +" printf(\"Thread %d: top of stack near %p; argv_string=%s\\en\",\n" +" tinfo-E<gt>thread_num, (void *) &tinfo, tinfo-E<gt>argv_string);\n" +"\\&\n" +" uargv = strdup(tinfo-E<gt>argv_string);\n" +" if (uargv == NULL)\n" +" handle_error(\"strdup\");\n" +"\\&\n" +" for (char *p = uargv; *p != \\[aq]\\e0\\[aq]; p++)\n" +" *p = toupper(*p);\n" +"\\&\n" +" return uargv;\n" +"}\n" +"\\&\n" +"int\n" +"main(int argc, char *argv[])\n" +"{\n" +" int s, opt;\n" +" void *res;\n" +" size_t num_threads;\n" +" ssize_t stack_size;\n" +" pthread_attr_t attr;\n" +" struct thread_info *tinfo;\n" +"\\&\n" +" /* The \"-s\" option specifies a stack size for our threads. */\n" +"\\&\n" +" stack_size = -1;\n" +" while ((opt = getopt(argc, argv, \"s:\")) != -1) {\n" +" switch (opt) {\n" +" case \\[aq]s\\[aq]:\n" +" stack_size = strtoul(optarg, NULL, 0);\n" +" break;\n" +"\\&\n" +" default:\n" +" fprintf(stderr, \"Usage: %s [-s stack-size] arg...\\en\",\n" +" argv[0]);\n" +" exit(EXIT_FAILURE);\n" +" }\n" +" }\n" +"\\&\n" +" num_threads = argc - optind;\n" +"\\&\n" +" /* Initialize thread creation attributes. */\n" +"\\&\n" +" s = pthread_attr_init(&attr);\n" +" if (s != 0)\n" +" handle_error_en(s, \"pthread_attr_init\");\n" +"\\&\n" +" if (stack_size E<gt> 0) {\n" +" s = pthread_attr_setstacksize(&attr, stack_size);\n" +" if (s != 0)\n" +" handle_error_en(s, \"pthread_attr_setstacksize\");\n" +" }\n" +"\\&\n" +" /* Allocate memory for pthread_create() arguments. */\n" +"\\&\n" +" tinfo = calloc(num_threads, sizeof(*tinfo));\n" +" if (tinfo == NULL)\n" +" handle_error(\"calloc\");\n" +"\\&\n" +" /* Create one thread for each command-line argument. */\n" +"\\&\n" +" for (size_t tnum = 0; tnum E<lt> num_threads; tnum++) {\n" +" tinfo[tnum].thread_num = tnum + 1;\n" +" tinfo[tnum].argv_string = argv[optind + tnum];\n" +"\\&\n" +" /* The pthread_create() call stores the thread ID into\n" +" corresponding element of tinfo[]. */\n" +"\\&\n" +" s = pthread_create(&tinfo[tnum].thread_id, &attr,\n" +" &thread_start, &tinfo[tnum]);\n" +" if (s != 0)\n" +" handle_error_en(s, \"pthread_create\");\n" +" }\n" +"\\&\n" +" /* Destroy the thread attributes object, since it is no\n" +" longer needed. */\n" +"\\&\n" +" s = pthread_attr_destroy(&attr);\n" +" if (s != 0)\n" +" handle_error_en(s, \"pthread_attr_destroy\");\n" +"\\&\n" +" /* Now join with each thread, and display its returned value. */\n" +"\\&\n" +" for (size_t tnum = 0; tnum E<lt> num_threads; tnum++) {\n" +" s = pthread_join(tinfo[tnum].thread_id, &res);\n" +" if (s != 0)\n" +" handle_error_en(s, \"pthread_join\");\n" +"\\&\n" +" printf(\"Joined with thread %d; returned value was %s\\en\",\n" +" tinfo[tnum].thread_num, (char *) res);\n" +" free(res); /* Free memory allocated by thread */\n" +" }\n" +"\\&\n" +" free(tinfo);\n" +" exit(EXIT_SUCCESS);\n" +"}\n" +msgstr "" + +#. SRC END +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "SEE ALSO" +msgstr "СМ. ТАКЖЕ" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_cancel>(3), " +"B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), " +"B<pthread_getattr_np>(3), B<pthread_join>(3), B<pthread_self>(3), " +"B<pthread_setattr_default_np>(3), B<pthreads>(7)" +msgstr "" +"B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_cancel>(3), " +"B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), " +"B<pthread_getattr_np>(3), B<pthread_join>(3), B<pthread_self>(3), " +"B<pthread_setattr_default_np>(3), B<pthreads>(7)" + +#. type: TH +#: debian-bookworm +#, no-wrap +msgid "2023-02-05" +msgstr "5 февраля 2023 г." + +#. type: TH +#: debian-bookworm +#, no-wrap +msgid "Linux man-pages 6.03" +msgstr "Linux man-pages 6.03" + +#. type: Plain text +#: debian-bookworm +msgid "POSIX.1-2001, POSIX.1-2008." +msgstr "POSIX.1-2001, POSIX.1-2008." + +#. type: Plain text +#: debian-bookworm debian-unstable opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"Under the NPTL threading implementation, if the B<RLIMIT_STACK> soft " +"resource limit I<at the time the program started> has any value other than " +"\"unlimited\", then it determines the default stack size of new threads. " +"Using B<pthread_attr_setstacksize>(3), the stack size attribute can be " +"explicitly set in the I<attr> argument used to create a thread, in order to " +"obtain a stack size other than the default. If the B<RLIMIT_STACK> resource " +"limit is set to \"unlimited\", a per-architecture value is used for the " +"stack size. Here is the value for a few architectures:" +msgstr "" +"В реализации нитей NPTL, если мягкое ограничение ресурса B<RLIMIT_STACK> " +"I<в момент запуска программы> не равно «unlimited», то им задаётся размер " +"стека по умолчанию для новых нитей. Чтобы получить размер стека, отличный от " +"умолчательного при создании новой нити, можно изменить атрибут размера стека " +"в аргументе I<attr> с помощью B<pthread_attr_setstacksize>(3). Если ресурс " +"B<RLIMIT_STACK> равен «unlimited», то для размера используется значение, " +"определённое для архитектуры. Вот значения для некоторых архитектур:" + +#. type: tbl table +#: debian-bookworm debian-unstable opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Architecture" +msgstr "Архитектура" + +#. type: tbl table +#: debian-bookworm debian-unstable opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Default stack size" +msgstr "Размер стека умолчанию" + +#. type: tbl table +#: debian-bookworm debian-unstable opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "i386" +msgstr "i386" + +#. type: tbl table +#: debian-bookworm debian-unstable opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "2 MB" +msgstr "2 МБ" + +#. type: tbl table +#: debian-bookworm debian-unstable opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "IA-64" +msgstr "IA-64" + +#. type: tbl table +#: debian-bookworm debian-unstable opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "32 MB" +msgstr "32 МБ" + +#. type: tbl table +#: debian-bookworm debian-unstable opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "PowerPC" +msgstr "PowerPC" + +#. type: tbl table +#: debian-bookworm debian-unstable opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "4 MB" +msgstr "4 МБ" + +#. type: tbl table +#: debian-bookworm debian-unstable opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "S/390" +msgstr "S/390" + +#. type: tbl table +#: debian-bookworm debian-unstable opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Sparc-32" +msgstr "Sparc-32" + +#. type: tbl table +#: debian-bookworm debian-unstable opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Sparc-64" +msgstr "Sparc-64" + +#. type: tbl table +#: debian-bookworm debian-unstable opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "x86_64" +msgstr "x86_64" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, fuzzy, no-wrap +#| msgid "" +#| "#include E<lt>time.hE<gt>\n" +#| "#include E<lt>stdio.hE<gt>\n" +#| "#include E<lt>stdlib.hE<gt>\n" +#| "#include E<lt>unistd.hE<gt>\n" +#| "#include E<lt>pthread.hE<gt>\n" +#| "#include E<lt>string.hE<gt>\n" +#| "#include E<lt>errno.hE<gt>\n" +msgid "" +"#include E<lt>ctype.hE<gt>\n" +"#include E<lt>errno.hE<gt>\n" +"#include E<lt>pthread.hE<gt>\n" +"#include E<lt>stdio.hE<gt>\n" +"#include E<lt>stdlib.hE<gt>\n" +"#include E<lt>string.hE<gt>\n" +"#include E<lt>unistd.hE<gt>\n" +msgstr "" +"#include E<lt>time.hE<gt>\n" +"#include E<lt>stdio.hE<gt>\n" +"#include E<lt>stdlib.hE<gt>\n" +"#include E<lt>unistd.hE<gt>\n" +"#include E<lt>pthread.hE<gt>\n" +"#include E<lt>string.hE<gt>\n" +"#include E<lt>errno.hE<gt>\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +"#define handle_error_en(en, msg) \\e\n" +" do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n" +msgstr "" +"#define handle_error_en(en, msg) \\e\n" +" do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +"#define handle_error(msg) \\e\n" +" do { perror(msg); exit(EXIT_FAILURE); } while (0)\n" +msgstr "" +"#define handle_error(msg) \\e\n" +" do { perror(msg); exit(EXIT_FAILURE); } while (0)\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +"struct thread_info { /* Used as argument to thread_start() */\n" +" pthread_t thread_id; /* ID returned by pthread_create() */\n" +" int thread_num; /* Application-defined thread # */\n" +" char *argv_string; /* From command-line argument */\n" +"};\n" +msgstr "" +"struct thread_info { /* используется как аргумент thread_start() */\n" +" pthread_t thread_id; /* ID, полученный от pthread_create() */\n" +" int thread_num; /* номер нити, определяемый\n" +" приложением */\n" +" char *argv_string; /* аргумент из командой строки */\n" +"};\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, fuzzy, no-wrap +#| msgid "" +#| "/* Thread start function: display address near top of our stack,\n" +#| " and return upper-cased copy of argv_string */\n" +msgid "" +"/* Thread start function: display address near top of our stack,\n" +" and return upper-cased copy of argv_string. */\n" +msgstr "" +"/* Начальная функция нити: показывает адрес около вершины нашего стека,\n" +" и возвращает копию argv_string заглавными буквами */\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, fuzzy, no-wrap +#| msgid "" +#| "static void *\n" +#| "thread_start(void *arg)\n" +#| "{\n" +#| " struct thread_info *tinfo = arg;\n" +#| " char *uargv, *p;\n" +msgid "" +"static void *\n" +"thread_start(void *arg)\n" +"{\n" +" struct thread_info *tinfo = arg;\n" +" char *uargv;\n" +msgstr "" +"static void *\n" +"thread_start(void *arg)\n" +"{\n" +" struct thread_info *tinfo = arg;\n" +" char *uargv, *p;\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, fuzzy, no-wrap +#| msgid "" +#| " printf(\"Thread %d: top of stack near %p; argv_string=%s\\en\",\n" +#| " tinfo-E<gt>thread_num, &p, tinfo-E<gt>argv_string);\n" +msgid "" +" printf(\"Thread %d: top of stack near %p; argv_string=%s\\en\",\n" +" tinfo-E<gt>thread_num, (void *) &tinfo, tinfo-E<gt>argv_string);\n" +msgstr "" +" printf(\"Нить %d: вершина стека около %p; argv_string=%s\\en\",\n" +" tinfo-E<gt>thread_num, &p, tinfo-E<gt>argv_string);\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" uargv = strdup(tinfo-E<gt>argv_string);\n" +" if (uargv == NULL)\n" +" handle_error(\"strdup\");\n" +msgstr "" +" uargv = strdup(tinfo-E<gt>argv_string);\n" +" if (uargv == NULL)\n" +" handle_error(\"strdup\");\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, fuzzy, no-wrap +#| msgid "" +#| " for (p = uargv; *p != \\(aq\\e0\\(aq; p++)\n" +#| " *p = toupper(*p);\n" +msgid "" +" for (char *p = uargv; *p != \\[aq]\\e0\\[aq]; p++)\n" +" *p = toupper(*p);\n" +msgstr "" +" for (p = uargv; *p != \\(aq\\e0\\(aq; p++)\n" +" *p = toupper(*p);\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" return uargv;\n" +"}\n" +msgstr "" +" return uargv;\n" +"}\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +"int\n" +"main(int argc, char *argv[])\n" +"{\n" +" int s, opt;\n" +" void *res;\n" +" size_t num_threads;\n" +" ssize_t stack_size;\n" +" pthread_attr_t attr;\n" +" struct thread_info *tinfo;\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, fuzzy, no-wrap +#| msgid " /* The \"-s\" option specifies a stack size for our threads */\n" +msgid " /* The \"-s\" option specifies a stack size for our threads. */\n" +msgstr " /* Параметром «-s» определяется размер стека в наших нитях */\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, fuzzy, no-wrap +#| msgid "" +#| " stack_size = -1;\n" +#| " while ((opt = getopt(argc, argv, \"s:\")) != -1) {\n" +#| " switch (opt) {\n" +#| " case \\(aqs\\(aq:\n" +#| " stack_size = strtoul(optarg, NULL, 0);\n" +#| " break;\n" +msgid "" +" stack_size = -1;\n" +" while ((opt = getopt(argc, argv, \"s:\")) != -1) {\n" +" switch (opt) {\n" +" case \\[aq]s\\[aq]:\n" +" stack_size = strtoul(optarg, NULL, 0);\n" +" break;\n" +msgstr "" +" stack_size = -1;\n" +" while ((opt = getopt(argc, argv, \"s:\")) != -1) {\n" +" switch (opt) {\n" +" case \\(aqs\\(aq:\n" +" stack_size = strtoul(optarg, NULL, 0);\n" +" break;\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" default:\n" +" fprintf(stderr, \"Usage: %s [-s stack-size] arg...\\en\",\n" +" argv[0]);\n" +" exit(EXIT_FAILURE);\n" +" }\n" +" }\n" +msgstr "" +" default:\n" +" fprintf(stderr, \"Исп.: %s [-s размер стека] арг...\\en\",\n" +" argv[0]);\n" +" exit(EXIT_FAILURE);\n" +" }\n" +" }\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid " num_threads = argc - optind;\n" +msgstr " num_threads = argc - optind;\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, fuzzy, no-wrap +#| msgid " /* Initialize thread creation attributes */\n" +msgid " /* Initialize thread creation attributes. */\n" +msgstr " /* инициализация атрибутов создания нити */\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" s = pthread_attr_init(&attr);\n" +" if (s != 0)\n" +" handle_error_en(s, \"pthread_attr_init\");\n" +msgstr "" +" s = pthread_attr_init(&attr);\n" +" if (s != 0)\n" +" handle_error_en(s, \"pthread_attr_init\");\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" if (stack_size E<gt> 0) {\n" +" s = pthread_attr_setstacksize(&attr, stack_size);\n" +" if (s != 0)\n" +" handle_error_en(s, \"pthread_attr_setstacksize\");\n" +" }\n" +msgstr "" +" if (stack_size E<gt> 0) {\n" +" s = pthread_attr_setstacksize(&attr, stack_size);\n" +" if (s != 0)\n" +" handle_error_en(s, \"pthread_attr_setstacksize\");\n" +" }\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, fuzzy, no-wrap +#| msgid " /* Allocate memory for pthread_create() arguments */\n" +msgid " /* Allocate memory for pthread_create() arguments. */\n" +msgstr " /* выделение памяти для аргументов pthread_create() */\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, fuzzy, no-wrap +#| msgid "" +#| " tinfo = calloc(num_threads, sizeof(struct thread_info));\n" +#| " if (tinfo == NULL)\n" +#| " handle_error(\"calloc\");\n" +msgid "" +" tinfo = calloc(num_threads, sizeof(*tinfo));\n" +" if (tinfo == NULL)\n" +" handle_error(\"calloc\");\n" +msgstr "" +" tinfo = calloc(num_threads, sizeof(struct thread_info));\n" +" if (tinfo == NULL)\n" +" handle_error(\"calloc\");\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, fuzzy, no-wrap +#| msgid " /* Create one thread for each command-line argument */\n" +msgid " /* Create one thread for each command-line argument. */\n" +msgstr " /* создание по одной нити на каждый аргумент командной строки */\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, fuzzy, no-wrap +#| msgid "" +#| " for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n" +#| " tinfo[tnum].thread_num = tnum + 1;\n" +#| " tinfo[tnum].argv_string = argv[optind + tnum];\n" +msgid "" +" for (size_t tnum = 0; tnum E<lt> num_threads; tnum++) {\n" +" tinfo[tnum].thread_num = tnum + 1;\n" +" tinfo[tnum].argv_string = argv[optind + tnum];\n" +msgstr "" +" for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n" +" tinfo[tnum].thread_num = tnum + 1;\n" +" tinfo[tnum].argv_string = argv[optind + tnum];\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, fuzzy, no-wrap +#| msgid "" +#| " /* The pthread_create() call stores the thread ID into\n" +#| " corresponding element of tinfo[] */\n" +msgid "" +" /* The pthread_create() call stores the thread ID into\n" +" corresponding element of tinfo[]. */\n" +msgstr "" +" /* вызов pthread_create() сохраняет ID нити в\n" +" соответствующий элемент tinfo[] */\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" s = pthread_create(&tinfo[tnum].thread_id, &attr,\n" +" &thread_start, &tinfo[tnum]);\n" +" if (s != 0)\n" +" handle_error_en(s, \"pthread_create\");\n" +" }\n" +msgstr "" +" s = pthread_create(&tinfo[tnum].thread_id, &attr,\n" +" &thread_start, &tinfo[tnum]);\n" +" if (s != 0)\n" +" handle_error_en(s, \"pthread_create\");\n" +" }\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, fuzzy, no-wrap +#| msgid "" +#| " /* Destroy the thread attributes object, since it is no\n" +#| " longer needed */\n" +msgid "" +" /* Destroy the thread attributes object, since it is no\n" +" longer needed. */\n" +msgstr "" +" /* уничтожение объекта атрибутов нити, так как он\n" +" больше не нужен */\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" s = pthread_attr_destroy(&attr);\n" +" if (s != 0)\n" +" handle_error_en(s, \"pthread_attr_destroy\");\n" +msgstr "" +" s = pthread_attr_destroy(&attr);\n" +" if (s != 0)\n" +" handle_error_en(s, \"pthread_attr_destroy\");\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, fuzzy, no-wrap +#| msgid " /* Now join with each thread, and display its returned value */\n" +msgid " /* Now join with each thread, and display its returned value. */\n" +msgstr "" +" /* теперь присоединяем каждую нить и показываем значение,\n" +" возвращённое ею */\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, fuzzy, no-wrap +#| msgid "" +#| " for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n" +#| " s = pthread_join(tinfo[tnum].thread_id, &res);\n" +#| " if (s != 0)\n" +#| " handle_error_en(s, \"pthread_join\");\n" +msgid "" +" for (size_t tnum = 0; tnum E<lt> num_threads; tnum++) {\n" +" s = pthread_join(tinfo[tnum].thread_id, &res);\n" +" if (s != 0)\n" +" handle_error_en(s, \"pthread_join\");\n" +msgstr "" +" for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n" +" s = pthread_join(tinfo[tnum].thread_id, &res);\n" +" if (s != 0)\n" +" handle_error_en(s, \"pthread_join\");\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, fuzzy, no-wrap +#| msgid "" +#| " printf(\"Joined with thread %d; returned value was %s\\en\",\n" +#| " tinfo[tnum].thread_num, (char *) res);\n" +#| " free(res); /* Free memory allocated by thread */\n" +#| " }\n" +msgid "" +" printf(\"Joined with thread %d; returned value was %s\\en\",\n" +" tinfo[tnum].thread_num, (char *) res);\n" +" free(res); /* Free memory allocated by thread */\n" +" }\n" +msgstr "" +" printf(\"Присоединение нити %d; получено значение возврата %s\\en\",\n" +" tinfo[tnum].thread_num, (char *) res);\n" +" free(res); /* освобождаем память, выделенную нитью */\n" +" }\n" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" free(tinfo);\n" +" exit(EXIT_SUCCESS);\n" +"}\n" +msgstr "" +" free(tinfo);\n" +" exit(EXIT_SUCCESS);\n" +"}\n" + +#. type: TH +#: debian-unstable opensuse-tumbleweed +#, no-wrap +msgid "2023-07-20" +msgstr "20 июля 2023 г." + +#. type: TH +#: debian-unstable opensuse-tumbleweed +#, no-wrap +msgid "Linux man-pages 6.05.01" +msgstr "Linux man-pages 6.05.01" + +#. type: TH +#: opensuse-leap-15-6 +#, no-wrap +msgid "2023-03-30" +msgstr "30 марта 2023 г." + +#. type: TH +#: opensuse-leap-15-6 +#, no-wrap +msgid "Linux man-pages 6.04" +msgstr "Linux man-pages 6.04" |