| 1 |
# Russian translation of manpages |
| 2 |
# This file is distributed under the same license as the manpages-l10n package. |
| 3 |
# Copyright © of this file: |
| 4 |
# Azamat Hackimov <[email protected]>, 2014, 2016-2017. |
| 5 |
# Dmitry Bolkhovskikh <[email protected]>, 2017. |
| 6 |
# Yuri Kozlov <[email protected]>, 2011-2019. |
| 7 |
# Иван Павлов <[email protected]>, 2017, 2019. |
| 8 |
msgid "" |
| 9 |
msgstr "" |
| 10 |
"Project-Id-Version: manpages-l10n\n" |
| 11 |
"POT-Creation-Date: 2026-06-05 06:49+0200\n" |
| 12 |
"PO-Revision-Date: 2024-12-21 19:49+0300\n" |
| 13 |
"Last-Translator: Yuri Kozlov <[email protected]>\n" |
| 14 |
"Language-Team: Russian <[email protected]>\n" |
| 15 |
"Language: ru\n" |
| 16 |
"MIME-Version: 1.0\n" |
| 17 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 18 |
"Content-Transfer-Encoding: 8bit\n" |
| 19 |
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " |
| 20 |
"n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || " |
| 21 |
"(n%100>=11 && n%100<=14)? 2 : 3);\n" |
| 22 |
"X-Generator: Lokalize 2.0\n" |
| 23 |
|
| 24 |
#. type: TH |
| 25 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 26 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 27 |
#, no-wrap |
| 28 |
msgid "timerfd_create" |
| 29 |
msgstr "timerfd_create" |
| 30 |
|
| 31 |
#. type: TH |
| 32 |
#: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed |
| 33 |
#, no-wrap |
| 34 |
msgid "2026-02-16" |
| 35 |
msgstr "16 февраля 2026 г." |
| 36 |
|
| 37 |
#. type: TH |
| 38 |
#: archlinux debian-unstable |
| 39 |
#, fuzzy, no-wrap |
| 40 |
#| msgid "Linux man-pages 6.17" |
| 41 |
msgid "Linux man-pages 6.18" |
| 42 |
msgstr "Справочные страницы Linux 6.17" |
| 43 |
|
| 44 |
#. type: SH |
| 45 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 46 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 47 |
#, no-wrap |
| 48 |
msgid "NAME" |
| 49 |
msgstr "НАИМЕНОВАНИЕ" |
| 50 |
|
| 51 |
#. type: Plain text |
| 52 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 53 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 54 |
msgid "" |
| 55 |
"timerfd_create, timerfd_settime, timerfd_gettime - timers that notify via " |
| 56 |
"file descriptors" |
| 57 |
msgstr "" |
| 58 |
"timerfd_create, timerfd_settime, timerfd_gettime - таймеры, уведомляющие " |
| 59 |
"через файловые дескрипторы" |
| 60 |
|
| 61 |
#. type: SH |
| 62 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 63 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 64 |
#, no-wrap |
| 65 |
msgid "LIBRARY" |
| 66 |
msgstr "БИБЛИОТЕКА" |
| 67 |
|
| 68 |
#. type: Plain text |
| 69 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 70 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 71 |
msgid "Standard C library (I<libc>,\\ I<-lc>)" |
| 72 |
msgstr "Стандартная библиотека языка C (I<libc>,\\ I<-lc>)" |
| 73 |
|
| 74 |
#. type: SH |
| 75 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 76 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 77 |
#, no-wrap |
| 78 |
msgid "SYNOPSIS" |
| 79 |
msgstr "СИНТАКСИС" |
| 80 |
|
| 81 |
#. type: Plain text |
| 82 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 83 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 84 |
#, no-wrap |
| 85 |
msgid "B<#include E<lt>sys/timerfd.hE<gt>>\n" |
| 86 |
msgstr "B<#include E<lt>sys/timerfd.hE<gt>>\n" |
| 87 |
|
| 88 |
#. type: Plain text |
| 89 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 90 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 91 |
#, no-wrap |
| 92 |
msgid "B<int timerfd_create(int >I<clockid>B<, int >I<flags>B<);>\n" |
| 93 |
msgstr "B<int timerfd_create(int >I<clockid>B<, int >I<flags>B<);>\n" |
| 94 |
|
| 95 |
#. type: Plain text |
| 96 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 97 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 98 |
#, fuzzy, no-wrap |
| 99 |
#| msgid "" |
| 100 |
#| "B<int timerfd_settime(int >I<fd>B<, int >I<flags>B<,>\n" |
| 101 |
#| "B< const struct itimerspec *>I<new_value>B<,>\n" |
| 102 |
#| "B< struct itimerspec *>I<old_value>B<);>\n" |
| 103 |
#| "B<int timerfd_gettime(int >I<fd>B<, struct itimerspec *>I<curr_value>B<);>\n" |
| 104 |
msgid "" |
| 105 |
"B<int timerfd_settime(int >I<fd>B<, int >I<flags>B<,>\n" |
| 106 |
"B< const struct itimerspec *>I<new_value>B<,>\n" |
| 107 |
"B< struct itimerspec *_Nullable >I<old_value>B<);>\n" |
| 108 |
"B<int timerfd_gettime(int >I<fd>B<, struct itimerspec *>I<curr_value>B<);>\n" |
| 109 |
msgstr "" |
| 110 |
"B<int timerfd_settime(int >I<fd>B<, int >I<flags>B<,>\n" |
| 111 |
"B< const struct itimerspec *>I<new_value>B<,>\n" |
| 112 |
"B< struct itimerspec *>I<old_value>B<);>\n" |
| 113 |
"B<int timerfd_gettime(int >I<fd>B<, struct itimerspec *>I<curr_value>B<);>\n" |
| 114 |
|
| 115 |
#. type: SH |
| 116 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 117 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 118 |
#, no-wrap |
| 119 |
msgid "DESCRIPTION" |
| 120 |
msgstr "ОПИСАНИЕ" |
| 121 |
|
| 122 |
#. type: Plain text |
| 123 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 124 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 125 |
msgid "" |
| 126 |
"These system calls create and operate on a timer that delivers timer " |
| 127 |
"expiration notifications via a file descriptor. They provide an alternative " |
| 128 |
"to the use of B<setitimer>(2) or B<timer_create>(2), with the advantage " |
| 129 |
"that the file descriptor may be monitored by B<select>(2), B<poll>(2), and " |
| 130 |
"B<epoll>(7)." |
| 131 |
msgstr "" |
| 132 |
"Эти системные вызовы создают и работают с таймером, доставляя уведомления о " |
| 133 |
"срабатывании через файловый дескриптор. Они предоставляют альтернативу " |
| 134 |
"B<setitimer>(2) или B<timer_create>(2); их преимущество в том, что за " |
| 135 |
"файловым дескриптором можно следить с помощью B<select>(2), B<poll>(2) и " |
| 136 |
"B<epoll>(7)." |
| 137 |
|
| 138 |
#. type: Plain text |
| 139 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 140 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 141 |
msgid "" |
| 142 |
"The use of these three system calls is analogous to the use of " |
| 143 |
"B<timer_create>(2), B<timer_settime>(2), and B<timer_gettime>(2). (There is " |
| 144 |
"no analog of B<timer_getoverrun>(2), since that functionality is provided by " |
| 145 |
"B<read>(2), as described below.)" |
| 146 |
msgstr "" |
| 147 |
"Использование данных трёх системных вызовов аналогично B<timer_create>(2), " |
| 148 |
"B<timer_settime>(2) и B<timer_gettime>(2) (аналога B<timer_getoverrun>(2) " |
| 149 |
"нет, так как его возможности предоставляет B<read>(2) как описано ниже)." |
| 150 |
|
| 151 |
#. type: SS |
| 152 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 153 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 154 |
#, no-wrap |
| 155 |
msgid "timerfd_create()" |
| 156 |
msgstr "timerfd_create()" |
| 157 |
|
| 158 |
#. type: Plain text |
| 159 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 160 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 161 |
msgid "" |
| 162 |
"B<timerfd_create>() creates a new timer object, and returns a file " |
| 163 |
"descriptor that refers to that timer. The I<clockid> argument specifies the " |
| 164 |
"clock that is used to mark the progress of the timer, and must be one of the " |
| 165 |
"following:" |
| 166 |
msgstr "" |
| 167 |
"Вызов B<timerfd_create>() создаёт новый объект таймера и возвращает файловый " |
| 168 |
"дескриптор, который ссылается на этот таймер. В аргументе I<clockid> " |
| 169 |
"задаются часы, которые используются для хода таймера; значением должно быть " |
| 170 |
"одно из следующих:" |
| 171 |
|
| 172 |
#. type: TP |
| 173 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 174 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 175 |
#, no-wrap |
| 176 |
msgid "B<CLOCK_REALTIME>" |
| 177 |
msgstr "B<CLOCK_REALTIME>" |
| 178 |
|
| 179 |
#. type: Plain text |
| 180 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 181 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 182 |
msgid "A settable system-wide real-time clock." |
| 183 |
msgstr "Настраиваемые системные часы реального времени." |
| 184 |
|
| 185 |
#. type: TP |
| 186 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 187 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 188 |
#, no-wrap |
| 189 |
msgid "B<CLOCK_MONOTONIC>" |
| 190 |
msgstr "B<CLOCK_MONOTONIC>" |
| 191 |
|
| 192 |
#. type: Plain text |
| 193 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 194 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 195 |
msgid "" |
| 196 |
"A nonsettable monotonically increasing clock that measures time from some " |
| 197 |
"unspecified point in the past that does not change after system startup." |
| 198 |
msgstr "" |
| 199 |
"Ненастраиваемые, постоянно идущие вперёд часы, отсчитывающие время с " |
| 200 |
"некоторой неопределённой точки в прошлом, которая не изменяется с момент " |
| 201 |
"запуска системы." |
| 202 |
|
| 203 |
#. type: TP |
| 204 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 205 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 206 |
#, no-wrap |
| 207 |
msgid "B<CLOCK_BOOTTIME> (Since Linux 3.15)" |
| 208 |
msgstr "B<CLOCK_BOOTTIME> (начиная с Linux 3.15)" |
| 209 |
|
| 210 |
#. commit 4a2378a943f09907fb1ae35c15de917f60289c14 |
| 211 |
#. type: Plain text |
| 212 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 213 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 214 |
msgid "" |
| 215 |
"Like B<CLOCK_MONOTONIC>, this is a monotonically increasing clock. However, " |
| 216 |
"whereas the B<CLOCK_MONOTONIC> clock does not measure the time while a " |
| 217 |
"system is suspended, the B<CLOCK_BOOTTIME> clock does include the time " |
| 218 |
"during which the system is suspended. This is useful for applications that " |
| 219 |
"need to be suspend-aware. B<CLOCK_REALTIME> is not suitable for such " |
| 220 |
"applications, since that clock is affected by discontinuous changes to the " |
| 221 |
"system clock." |
| 222 |
msgstr "" |
| 223 |
"Подобно B<CLOCK_MONOTONIC>, представляет монотонно растущие часы. Однако, " |
| 224 |
"если часы B<CLOCK_MONOTONIC> не отсчитывают время когда система находится в " |
| 225 |
"состоянии ожидания (suspended), а часы B<CLOCK_BOOTTIME> учитывают время в " |
| 226 |
"таком состоянии системы. Это полезно приложениям, которым необходимо " |
| 227 |
"учитывать состояние ожидания. B<CLOCK_REALTIME> не подходят для таких " |
| 228 |
"приложений, так как эти часы подвержены скачкообразным изменениям системных " |
| 229 |
"часов." |
| 230 |
|
| 231 |
#. type: TP |
| 232 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 233 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 234 |
#, no-wrap |
| 235 |
msgid "B<CLOCK_REALTIME_ALARM> (since Linux 3.11)" |
| 236 |
msgstr "B<CLOCK_REALTIME_ALARM> (начиная с Linux 3.11)" |
| 237 |
|
| 238 |
#. commit 11ffa9d6065f344a9bd769a2452f26f2f671e5f8 |
| 239 |
#. type: Plain text |
| 240 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 241 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 242 |
msgid "" |
| 243 |
"This clock is like B<CLOCK_REALTIME>, but will wake the system if it is " |
| 244 |
"suspended. The caller must have the B<CAP_WAKE_ALARM> capability in order " |
| 245 |
"to set a timer against this clock." |
| 246 |
msgstr "" |
| 247 |
"Эти часы подобны B<CLOCK_REALTIME>, но разбудят систему, если она находится " |
| 248 |
"с состоянии ожидания. Для установки таймера по этим часам вызывающий должен " |
| 249 |
"иметь мандат B<CAP_WAKE_ALARM>." |
| 250 |
|
| 251 |
#. type: TP |
| 252 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 253 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 254 |
#, no-wrap |
| 255 |
msgid "B<CLOCK_BOOTTIME_ALARM> (since Linux 3.11)" |
| 256 |
msgstr "B<CLOCK_BOOTTIME_ALARM> (начиная с Linux 3.11)" |
| 257 |
|
| 258 |
#. commit 11ffa9d6065f344a9bd769a2452f26f2f671e5f8 |
| 259 |
#. type: Plain text |
| 260 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 261 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 262 |
msgid "" |
| 263 |
"This clock is like B<CLOCK_BOOTTIME>, but will wake the system if it is " |
| 264 |
"suspended. The caller must have the B<CAP_WAKE_ALARM> capability in order " |
| 265 |
"to set a timer against this clock." |
| 266 |
msgstr "" |
| 267 |
"Эти часы подобны B<CLOCK_BOOTTIME>, но разбудят систему, если она находится " |
| 268 |
"с состоянии ожидания. Для установки таймера по этим часам вызывающий должен " |
| 269 |
"иметь мандат B<CAP_WAKE_ALARM>." |
| 270 |
|
| 271 |
#. type: Plain text |
| 272 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 273 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 274 |
msgid "See B<clock_getres>(2) for some further details on the above clocks." |
| 275 |
msgstr "" |
| 276 |
|
| 277 |
#. type: Plain text |
| 278 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 279 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 280 |
msgid "" |
| 281 |
"The current value of each of these clocks can be retrieved using " |
| 282 |
"B<clock_gettime>(2)." |
| 283 |
msgstr "" |
| 284 |
"Текущее значение каждого из этих часов можно получить с помощью " |
| 285 |
"B<clock_gettime>(2)." |
| 286 |
|
| 287 |
#. type: Plain text |
| 288 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 289 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 290 |
msgid "" |
| 291 |
"Starting with Linux 2.6.27, the following values may be bitwise ORed in " |
| 292 |
"I<flags> to change the behavior of B<timerfd_create>():" |
| 293 |
msgstr "" |
| 294 |
"Начиная с Linux 2.6.27, для изменения поведения B<timerfd_create>() можно " |
| 295 |
"использовать следующие значения I<flags> (через OR):" |
| 296 |
|
| 297 |
#. type: TP |
| 298 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 299 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 300 |
#, no-wrap |
| 301 |
msgid "B<TFD_NONBLOCK>" |
| 302 |
msgstr "B<TFD_NONBLOCK>" |
| 303 |
|
| 304 |
#. type: Plain text |
| 305 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 306 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 307 |
msgid "" |
| 308 |
"Set the B<O_NONBLOCK> file status flag on the open file description (see " |
| 309 |
"B<open>(2)) referred to by the new file descriptor. Using this flag saves " |
| 310 |
"extra calls to B<fcntl>(2) to achieve the same result." |
| 311 |
msgstr "" |
| 312 |
"Устанавливает флаг состояния файла B<O_NONBLOCK> для нового открытого " |
| 313 |
"файлового описания (смотрите B<open>(2)), на которое ссылается новый " |
| 314 |
"файловый дескриптор. Использование данного флага делает ненужными " |
| 315 |
"дополнительные вызовы B<fcntl>(2) для достижения того же результата." |
| 316 |
|
| 317 |
#. type: TP |
| 318 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 319 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 320 |
#, no-wrap |
| 321 |
msgid "B<TFD_CLOEXEC>" |
| 322 |
msgstr "B<TFD_CLOEXEC>" |
| 323 |
|
| 324 |
#. type: Plain text |
| 325 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 326 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 327 |
msgid "" |
| 328 |
"Set the close-on-exec (B<FD_CLOEXEC>) flag on the new file descriptor. See " |
| 329 |
"the description of the B<O_CLOEXEC> flag in B<open>(2) for reasons why this " |
| 330 |
"may be useful." |
| 331 |
msgstr "" |
| 332 |
"Устанавливает флаг close-on-exec (B<FD_CLOEXEC>) для нового открытого " |
| 333 |
"файлового дескриптора. Смотрите описание флага B<O_CLOEXEC> в B<open>(2) для " |
| 334 |
"того, чтобы узнать как это может пригодиться." |
| 335 |
|
| 336 |
#. type: Plain text |
| 337 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 338 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 339 |
msgid "" |
| 340 |
"In Linux versions up to and including 2.6.26, I<flags> must be specified as " |
| 341 |
"zero." |
| 342 |
msgstr "До Linux 2.6.26 включительно аргумент I<flags> должен быть равен нулю." |
| 343 |
|
| 344 |
#. type: SS |
| 345 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 346 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 347 |
#, no-wrap |
| 348 |
msgid "timerfd_settime()" |
| 349 |
msgstr "timerfd_settime()" |
| 350 |
|
| 351 |
#. type: Plain text |
| 352 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 353 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 354 |
msgid "" |
| 355 |
"B<timerfd_settime>() arms (starts) or disarms (stops) the timer referred " |
| 356 |
"to by the file descriptor I<fd>." |
| 357 |
msgstr "" |
| 358 |
"Вызов B<timerfd_settime>() запускает или останавливает таймер, на который " |
| 359 |
"ссылается файловый дескриптор I<fd>." |
| 360 |
|
| 361 |
#. type: Plain text |
| 362 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 363 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 364 |
#, fuzzy |
| 365 |
#| msgid "" |
| 366 |
#| "The I<new_value> argument specifies the initial expiration and interval " |
| 367 |
#| "for the timer. The I<itimerspec> structure used for this argument " |
| 368 |
#| "contains two fields, each of which is in turn a structure of type " |
| 369 |
#| "I<timespec>:" |
| 370 |
msgid "" |
| 371 |
"The I<new_value> argument specifies the initial expiration and interval for " |
| 372 |
"the timer. The I<itimerspec> structure used for this argument is described " |
| 373 |
"in B<itimerspec>(3type)." |
| 374 |
msgstr "" |
| 375 |
"В аргументе I<new_value> задаётся начальное срабатывание и интервал таймера. " |
| 376 |
"Для этого аргумента используется структура I<itimerspec>, содержащая два " |
| 377 |
"поля, каждое из которых, в свою очередь, является структурой I<timespec>:" |
| 378 |
|
| 379 |
#. type: Plain text |
| 380 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 381 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 382 |
msgid "" |
| 383 |
"I<new_value.it_value> specifies the initial expiration of the timer, in " |
| 384 |
"seconds and nanoseconds. Setting either field of I<new_value.it_value> to a " |
| 385 |
"nonzero value arms the timer. Setting both fields of I<new_value.it_value> " |
| 386 |
"to zero disarms the timer." |
| 387 |
msgstr "" |
| 388 |
"В I<new_value.it_value> задаётся первое срабатывание таймера, в секундах и " |
| 389 |
"наносекундах. Установка любого из полей I<new_value.it_value> в ненулевое " |
| 390 |
"значение включает таймер. Установка обоих полей I<new_value.it_value> в ноль " |
| 391 |
"выключает таймер." |
| 392 |
|
| 393 |
#. type: Plain text |
| 394 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 395 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 396 |
msgid "" |
| 397 |
"Setting one or both fields of I<new_value.it_interval> to nonzero values " |
| 398 |
"specifies the period, in seconds and nanoseconds, for repeated timer " |
| 399 |
"expirations after the initial expiration. If both fields of " |
| 400 |
"I<new_value.it_interval> are zero, the timer expires just once, at the time " |
| 401 |
"specified by I<new_value.it_value>." |
| 402 |
msgstr "" |
| 403 |
"Установка одного или обоих полей I<new_value.it_interval> в ненулевое " |
| 404 |
"значение задаёт период, в секундах и наносекундах, периодического " |
| 405 |
"срабатывания таймера после первого срабатывания. Если оба поля " |
| 406 |
"I<new_value.it_interval> равны нулю, то таймер срабатывает только один раз, " |
| 407 |
"во время, указанное в I<new_value.it_value>." |
| 408 |
|
| 409 |
#. type: Plain text |
| 410 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 411 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 412 |
msgid "" |
| 413 |
"By default, the initial expiration time specified in I<new_value> is " |
| 414 |
"interpreted relative to the current time on the timer's clock at the time of " |
| 415 |
"the call (i.e., I<new_value.it_value> specifies a time relative to the " |
| 416 |
"current value of the clock specified by I<clockid>). An absolute timeout " |
| 417 |
"can be selected via the I<flags> argument." |
| 418 |
msgstr "" |
| 419 |
"По умолчанию, начальное время срабатывания, задаваемое в I<new_value>, " |
| 420 |
"считается относительно текущего времени часов таймера на момент вызова (т. " |
| 421 |
"е., в I<new_value.it_value> задаётся время относительно текущего значения " |
| 422 |
"часов, заданных в I<clockid>). Использование абсолютной задержки можно " |
| 423 |
"включить через аргумент I<flags>." |
| 424 |
|
| 425 |
#. type: Plain text |
| 426 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 427 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 428 |
msgid "" |
| 429 |
"The I<flags> argument is a bit mask that can include the following values:" |
| 430 |
msgstr "" |
| 431 |
"Аргумент I<flags> является битовой маской, которая может включать следующие " |
| 432 |
"значения:" |
| 433 |
|
| 434 |
#. type: TP |
| 435 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 436 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 437 |
#, no-wrap |
| 438 |
msgid "B<TFD_TIMER_ABSTIME>" |
| 439 |
msgstr "B<TFD_TIMER_ABSTIME>" |
| 440 |
|
| 441 |
#. type: Plain text |
| 442 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 443 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 444 |
msgid "" |
| 445 |
"Interpret I<new_value.it_value> as an absolute value on the timer's clock. " |
| 446 |
"The timer will expire when the value of the timer's clock reaches the value " |
| 447 |
"specified in I<new_value.it_value>." |
| 448 |
msgstr "" |
| 449 |
"Считать I<new_value.it_value> абсолютным значением часов таймера. Таймер " |
| 450 |
"сработает, когда значение часов таймера достигнет значения, указанного в " |
| 451 |
"I<new_value.it_value>." |
| 452 |
|
| 453 |
#. type: TP |
| 454 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 455 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 456 |
#, no-wrap |
| 457 |
msgid "B<TFD_TIMER_CANCEL_ON_SET>" |
| 458 |
msgstr "B<TFD_TIMER_CANCEL_ON_SET>" |
| 459 |
|
| 460 |
#. type: Plain text |
| 461 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 462 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 463 |
msgid "" |
| 464 |
"If this flag is specified along with B<TFD_TIMER_ABSTIME> and the clock for " |
| 465 |
"this timer is B<CLOCK_REALTIME> or B<CLOCK_REALTIME_ALARM>, then mark this " |
| 466 |
"timer as cancelable if the real-time clock undergoes a discontinuous change " |
| 467 |
"(B<settimeofday>(2), B<clock_settime>(2), or similar). When such changes " |
| 468 |
"occur, a current or future B<read>(2) from the file descriptor will fail " |
| 469 |
"with the error B<ECANCELED>." |
| 470 |
msgstr "" |
| 471 |
"Если этот флаг указан вместе с B<TFD_TIMER_ABSTIME> и часами этого таймера " |
| 472 |
"являются B<CLOCK_REALTIME> или B<CLOCK_REALTIME_ALARM>, то помечать этот " |
| 473 |
"таймер как отменяемый, если часы реального времени подвергнуться " |
| 474 |
"скачкообразному изменению (B<settimeofday>(2), B<clock_settime>(2) или " |
| 475 |
"подобными). Когда такие изменения происходят, текущий или будущий вызова " |
| 476 |
"B<read>(2) для файлового дескриптора завершается с ошибкой B<ECANCELED>." |
| 477 |
|
| 478 |
#. type: Plain text |
| 479 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 480 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 481 |
msgid "" |
| 482 |
"If the I<old_value> argument is not NULL, then the I<itimerspec> structure " |
| 483 |
"that it points to is used to return the setting of the timer that was " |
| 484 |
"current at the time of the call; see the description of " |
| 485 |
"B<timerfd_gettime>() following." |
| 486 |
msgstr "" |
| 487 |
"Если I<old_value> не равно NULL, то это указатель на структуру " |
| 488 |
"I<itimerspec>, и он будет использоваться для возврата текущих на момент " |
| 489 |
"вызова настроек таймера; смотрите описание B<timerfd_gettime>() далее." |
| 490 |
|
| 491 |
#. type: SS |
| 492 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 493 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 494 |
#, no-wrap |
| 495 |
msgid "timerfd_gettime()" |
| 496 |
msgstr "timerfd_gettime()" |
| 497 |
|
| 498 |
#. type: Plain text |
| 499 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 500 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 501 |
msgid "" |
| 502 |
"B<timerfd_gettime>() returns, in I<curr_value>, an I<itimerspec> structure " |
| 503 |
"that contains the current setting of the timer referred to by the file " |
| 504 |
"descriptor I<fd>." |
| 505 |
msgstr "" |
| 506 |
"Вызов B<timerfd_gettime>() возвращает в I<curr_value>, которое указывает на " |
| 507 |
"структуру I<itimerspec>, текущие настройки таймера, на который ссылается " |
| 508 |
"файловый дескриптор I<fd>." |
| 509 |
|
| 510 |
#. type: Plain text |
| 511 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 512 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 513 |
msgid "" |
| 514 |
"The I<it_value> field returns the amount of time until the timer will next " |
| 515 |
"expire. If both fields of this structure are zero, then the timer is " |
| 516 |
"currently disarmed. This field always contains a relative value, regardless " |
| 517 |
"of whether the B<TFD_TIMER_ABSTIME> flag was specified when setting the " |
| 518 |
"timer." |
| 519 |
msgstr "" |
| 520 |
"В поле I<it_value> возвращается время до следующего срабатывания таймера. " |
| 521 |
"Если оба поля этой структуры равны нулю, то таймер в данный момент не " |
| 522 |
"запущен. Это поле всегда содержит относительное значение, независимо от " |
| 523 |
"того, был ли указан флаг B<TFD_TIMER_ABSTIME> при настройке таймера." |
| 524 |
|
| 525 |
#. type: Plain text |
| 526 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 527 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 528 |
msgid "" |
| 529 |
"The I<it_interval> field returns the interval of the timer. If both fields " |
| 530 |
"of this structure are zero, then the timer is set to expire just once, at " |
| 531 |
"the time specified by I<curr_value.it_value>." |
| 532 |
msgstr "" |
| 533 |
"В поле I<it_interval> возвращается интервал таймера. Если оба поля этой " |
| 534 |
"структуры равны нулю, то таймер настроен на однократное срабатывание, на " |
| 535 |
"время, заданное в I<curr_value.it_value>." |
| 536 |
|
| 537 |
#. type: SS |
| 538 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 539 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 540 |
#, no-wrap |
| 541 |
msgid "Operating on a timer file descriptor" |
| 542 |
msgstr "Работа с файловым дескриптором таймера" |
| 543 |
|
| 544 |
#. type: Plain text |
| 545 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 546 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 547 |
#, fuzzy |
| 548 |
#| msgid "" |
| 549 |
#| "The file descriptor returned by B<timerfd_create>() supports the " |
| 550 |
#| "following operations:" |
| 551 |
msgid "" |
| 552 |
"The file descriptor returned by B<timerfd_create>() supports the following " |
| 553 |
"additional operations:" |
| 554 |
msgstr "" |
| 555 |
"Файловый дескриптор, возвращаемый B<timerfd_create>(), поддерживает " |
| 556 |
"следующие операции:" |
| 557 |
|
| 558 |
#. type: TP |
| 559 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 560 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 561 |
#, no-wrap |
| 562 |
msgid "B<read>(2)" |
| 563 |
msgstr "B<read>(2)" |
| 564 |
|
| 565 |
#. type: Plain text |
| 566 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 567 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 568 |
#, fuzzy |
| 569 |
#| msgid "" |
| 570 |
#| "If the timer has already expired one or more times since its settings " |
| 571 |
#| "were last modified using B<timerfd_settime>(), or since the last " |
| 572 |
#| "successful B<read>(2), then the buffer given to B<read>(2) returns an " |
| 573 |
#| "unsigned 8-byte integer (I<uint64_t>) containing the number of " |
| 574 |
#| "expirations that have occurred. (The returned value is in host byte " |
| 575 |
#| "order\\(emthat is, the native byte order for integers on the host " |
| 576 |
#| "machine.)" |
| 577 |
msgid "" |
| 578 |
"If the timer has already expired one or more times since its settings were " |
| 579 |
"last modified using B<timerfd_settime>(), or since the last successful " |
| 580 |
"B<read>(2), then the buffer given to B<read>(2) returns an unsigned 8-byte " |
| 581 |
"integer (I<uint64_t>) containing the number of expirations that have " |
| 582 |
"occurred. (The returned value is in host byte order\\[em]that is, the " |
| 583 |
"native byte order for integers on the host machine.)" |
| 584 |
msgstr "" |
| 585 |
"Если таймер уже сработал один или более раз с момента настройки с помощью " |
| 586 |
"B<timerfd_settime>(), или после последнего успешного B<read>(2), то в буфер, " |
| 587 |
"указанный в B<read>(2), будет возвращено беззнаковое 8-байтное целое " |
| 588 |
"(I<uint64_t>), содержащее количество произошедших срабатываний (возвращаемое " |
| 589 |
"значение хранится в порядке байт узла, то есть родном порядке для целых " |
| 590 |
"чисел машины выполнения)." |
| 591 |
|
| 592 |
#. type: Plain text |
| 593 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 594 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 595 |
msgid "" |
| 596 |
"If no timer expirations have occurred at the time of the B<read>(2), then " |
| 597 |
"the call either blocks until the next timer expiration, or fails with the " |
| 598 |
"error B<EAGAIN> if the file descriptor has been made nonblocking (via the " |
| 599 |
"use of the B<fcntl>(2) B<F_SETFL> operation to set the B<O_NONBLOCK> flag)." |
| 600 |
msgstr "" |
| 601 |
"Если таймер ещё не срабатывал до вызова B<read>(2), то вызов блокирует " |
| 602 |
"выполнение до следующего срабатывания таймера, или завершается с ошибкой " |
| 603 |
"B<EAGAIN>, если файловый дескриптор был создан неблокирующим (с помощью " |
| 604 |
"вызова B<fcntl>(2) и операции B<F_SETFL> с флагом B<O_NONBLOCK>)." |
| 605 |
|
| 606 |
#. type: Plain text |
| 607 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 608 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 609 |
msgid "" |
| 610 |
"A B<read>(2) fails with the error B<EINVAL> if the size of the supplied " |
| 611 |
"buffer is less than 8 bytes." |
| 612 |
msgstr "" |
| 613 |
"Вызов B<read>(2) завершается ошибкой B<EINVAL>, если размер указанного " |
| 614 |
"буфера будет меньше 8 байт." |
| 615 |
|
| 616 |
#. type: Plain text |
| 617 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 618 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 619 |
msgid "" |
| 620 |
"If the associated clock is either B<CLOCK_REALTIME> or " |
| 621 |
"B<CLOCK_REALTIME_ALARM>, the timer is absolute (B<TFD_TIMER_ABSTIME>), and " |
| 622 |
"the flag B<TFD_TIMER_CANCEL_ON_SET> was specified when calling " |
| 623 |
"B<timerfd_settime>(), then B<read>(2) fails with the error B<ECANCELED> if " |
| 624 |
"the real-time clock undergoes a discontinuous change. (This allows the " |
| 625 |
"reading application to discover such discontinuous changes to the clock.)" |
| 626 |
msgstr "" |
| 627 |
"Если используются часы B<CLOCK_REALTIME> или B<CLOCK_REALTIME_ALARM>, таймер " |
| 628 |
"является абсолютным (B<TFD_TIMER_ABSTIME>) и при вызове B<timerfd_settime>() " |
| 629 |
"указан флаг B<TFD_TIMER_CANCEL_ON_SET>, то B<read>(2) завершается ошибкой " |
| 630 |
"B<ECANCELED>, если часы реального времени подвергнуться скачкообразному " |
| 631 |
"изменению (это позволяет читающему приложению обнаружить такие " |
| 632 |
"скачкообразные изменения часов)." |
| 633 |
|
| 634 |
#. type: Plain text |
| 635 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 636 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 637 |
#, fuzzy |
| 638 |
#| msgid "" |
| 639 |
#| "If the associated clock is either B<CLOCK_REALTIME> or " |
| 640 |
#| "B<CLOCK_REALTIME_ALARM>, the timer is absolute (B<TFD_TIMER_ABSTIME>), " |
| 641 |
#| "and the flag B<TFD_TIMER_CANCEL_ON_SET> was specified when calling " |
| 642 |
#| "B<timerfd_settime>(), then B<read>(2) fails with the error B<ECANCELED> " |
| 643 |
#| "if the real-time clock undergoes a discontinuous change. (This allows " |
| 644 |
#| "the reading application to discover such discontinuous changes to the " |
| 645 |
#| "clock.)" |
| 646 |
msgid "" |
| 647 |
"If the associated clock is either B<CLOCK_REALTIME> or " |
| 648 |
"B<CLOCK_REALTIME_ALARM>, the timer is absolute (B<TFD_TIMER_ABSTIME>), and " |
| 649 |
"the flag B<TFD_TIMER_CANCEL_ON_SET> was I<not> specified when calling " |
| 650 |
"B<timerfd_settime>(), then a discontinuous negative change to the clock " |
| 651 |
"(e.g., B<clock_settime>(2)) may cause B<read>(2) to unblock, but return a " |
| 652 |
"value of 0 (i.e., no bytes read), if the clock change occurs after the time " |
| 653 |
"expired, but before the B<read>(2) on the file descriptor." |
| 654 |
msgstr "" |
| 655 |
"Если используются часы B<CLOCK_REALTIME> или B<CLOCK_REALTIME_ALARM>, таймер " |
| 656 |
"является абсолютным (B<TFD_TIMER_ABSTIME>) и при вызове B<timerfd_settime>() " |
| 657 |
"указан флаг B<TFD_TIMER_CANCEL_ON_SET>, то B<read>(2) завершается ошибкой " |
| 658 |
"B<ECANCELED>, если часы реального времени подвергнуться скачкообразному " |
| 659 |
"изменению (это позволяет читающему приложению обнаружить такие " |
| 660 |
"скачкообразные изменения часов)." |
| 661 |
|
| 662 |
#. type: TP |
| 663 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 664 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 665 |
#, no-wrap |
| 666 |
msgid "B<poll>(2)" |
| 667 |
msgstr "B<poll>(2)" |
| 668 |
|
| 669 |
#. type: TQ |
| 670 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 671 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 672 |
#, no-wrap |
| 673 |
msgid "B<select>(2)" |
| 674 |
msgstr "B<select>(2)" |
| 675 |
|
| 676 |
#. type: TQ |
| 677 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 678 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 679 |
#, no-wrap |
| 680 |
msgid "(and similar)" |
| 681 |
msgstr "(и подобные)" |
| 682 |
|
| 683 |
#. type: Plain text |
| 684 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 685 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 686 |
msgid "" |
| 687 |
"The file descriptor is readable (the B<select>(2) I<readfds> argument; the " |
| 688 |
"B<poll>(2) B<POLLIN> flag) if one or more timer expirations have occurred." |
| 689 |
msgstr "" |
| 690 |
"Файловый дескриптор доступен для чтения (в B<select>(2) аргумент I<readfds>; " |
| 691 |
"в B<poll>(2) флаг B<POLLIN>), если произошло одно или более срабатываний " |
| 692 |
"таймера." |
| 693 |
|
| 694 |
#. type: Plain text |
| 695 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 696 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 697 |
msgid "" |
| 698 |
"The file descriptor also supports the other file-descriptor multiplexing " |
| 699 |
"APIs: B<pselect>(2), B<ppoll>(2), and B<epoll>(7)." |
| 700 |
msgstr "" |
| 701 |
"Файловый дескриптор также поддерживает другие мультиплексные вызовы: " |
| 702 |
"B<pselect>(2), B<ppoll>(2) и B<epoll>(7)." |
| 703 |
|
| 704 |
#. type: TP |
| 705 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 706 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 707 |
#, no-wrap |
| 708 |
msgid "B<ioctl>(2)" |
| 709 |
msgstr "B<ioctl>(2)" |
| 710 |
|
| 711 |
#. type: Plain text |
| 712 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 713 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 714 |
msgid "The following timerfd-specific command is supported:" |
| 715 |
msgstr "Поддерживается следующая команда, относящаяся к timerfd:" |
| 716 |
|
| 717 |
#. type: TP |
| 718 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 719 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 720 |
#, no-wrap |
| 721 |
msgid "B<TFD_IOC_SET_TICKS> (since Linux 3.17)" |
| 722 |
msgstr "B<TFD_IOC_SET_TICKS> (начиная с Linux 3.17)" |
| 723 |
|
| 724 |
#. commit 5442e9fbd7c23172a1c9bc736629cd123a9923f0 |
| 725 |
#. type: Plain text |
| 726 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 727 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 728 |
msgid "" |
| 729 |
"Adjust the number of timer expirations that have occurred. The argument is " |
| 730 |
"a pointer to a nonzero 8-byte integer (I<uint64_t>*) containing the new " |
| 731 |
"number of expirations. Once the number is set, any waiter on the timer is " |
| 732 |
"woken up. The only purpose of this command is to restore the expirations " |
| 733 |
"for the purpose of checkpoint/restore. This operation is available only if " |
| 734 |
"the kernel was configured with the B<CONFIG_CHECKPOINT_RESTORE> option." |
| 735 |
msgstr "" |
| 736 |
"Корректирует количество истечений таймера, которые произошли. Аргументом " |
| 737 |
"является указатель на ненулевое 8-байтовое целое (I<uint64_t>*), содержащее " |
| 738 |
"новое количество истечений. После установки количества, все ожидающие " |
| 739 |
"таймера пробуждаются. Единственная цель данной команды — восстановить " |
| 740 |
"истечений для отсечки/восстановления. Данная операция доступна только, если " |
| 741 |
"ядро собрано с параметром B<CONFIG_CHECKPOINT_RESTORE>." |
| 742 |
|
| 743 |
#. type: TP |
| 744 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 745 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 746 |
#, no-wrap |
| 747 |
msgid "B<close>(2)" |
| 748 |
msgstr "B<close>(2)" |
| 749 |
|
| 750 |
#. type: Plain text |
| 751 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 752 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 753 |
msgid "" |
| 754 |
"When the file descriptor is no longer required it should be closed. When " |
| 755 |
"all file descriptors associated with the same timer object have been closed, " |
| 756 |
"the timer is disarmed and its resources are freed by the kernel." |
| 757 |
msgstr "" |
| 758 |
"Если файловый дескриптор больше не требуется, его нужно закрыть. Когда все " |
| 759 |
"файловые дескрипторы, связанные с одним объектом таймера, будут закрыты, " |
| 760 |
"таймер выключается и ядро освобождает его ресурсы." |
| 761 |
|
| 762 |
#. type: SS |
| 763 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 764 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 765 |
#, no-wrap |
| 766 |
msgid "fork(2) semantics" |
| 767 |
msgstr "Поведение при fork(2)" |
| 768 |
|
| 769 |
#. type: Plain text |
| 770 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 771 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 772 |
msgid "" |
| 773 |
"After a B<fork>(2), the child inherits a copy of the file descriptor created " |
| 774 |
"by B<timerfd_create>(). The file descriptor refers to the same underlying " |
| 775 |
"timer object as the corresponding file descriptor in the parent, and " |
| 776 |
"B<read>(2)s in the child will return information about expirations of the " |
| 777 |
"timer." |
| 778 |
msgstr "" |
| 779 |
"После B<fork>(2) потомки наследуют копию файлового дескриптора, созданного " |
| 780 |
"B<timerfd_create>(). Файловый дескриптор потомка ссылается на тот же объект " |
| 781 |
"таймера, что и файловый дескриптор его родителя, и операция B<read>(2) в " |
| 782 |
"потомке будет возвращать информацию о срабатываниях таймера." |
| 783 |
|
| 784 |
#. type: SS |
| 785 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 786 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 787 |
#, no-wrap |
| 788 |
msgid "execve(2) semantics" |
| 789 |
msgstr "Поведение при execve(2)" |
| 790 |
|
| 791 |
#. type: Plain text |
| 792 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 793 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 794 |
msgid "" |
| 795 |
"A file descriptor created by B<timerfd_create>() is preserved across " |
| 796 |
"B<execve>(2), and continues to generate timer expirations if the timer was " |
| 797 |
"armed." |
| 798 |
msgstr "" |
| 799 |
"Файловый дескриптор, созданный B<timerfd_create>(), сохраняется при " |
| 800 |
"B<execve>(2), и продолжает генерировать срабатывания таймера, если он " |
| 801 |
"включён." |
| 802 |
|
| 803 |
#. type: SH |
| 804 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 805 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 806 |
#, no-wrap |
| 807 |
msgid "RETURN VALUE" |
| 808 |
msgstr "ВОЗВРАЩАЕМОЕ ЗНАЧЕНИЕ" |
| 809 |
|
| 810 |
#. type: Plain text |
| 811 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 812 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 813 |
msgid "" |
| 814 |
"On success, B<timerfd_create>() returns a new file descriptor. On error, " |
| 815 |
"-1 is returned and I<errno> is set to indicate the error." |
| 816 |
msgstr "" |
| 817 |
"При успешном выполнении B<timerfd_create>() возвращает новый файловый " |
| 818 |
"дескриптор. При ошибке возвращается -1, и I<errno> устанавливается в " |
| 819 |
"соответствующее значение." |
| 820 |
|
| 821 |
#. type: Plain text |
| 822 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 823 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 824 |
msgid "" |
| 825 |
"B<timerfd_settime>() and B<timerfd_gettime>() return 0 on success; on " |
| 826 |
"error they return -1, and set I<errno> to indicate the error." |
| 827 |
msgstr "" |
| 828 |
"При успешном выполнении B<timerfd_settime>() и B<timerfd_gettime>() " |
| 829 |
"возвращают 0; в случае ошибки возвращается -1, а I<errno> устанавливается в " |
| 830 |
"соответствующее значение ошибки." |
| 831 |
|
| 832 |
#. type: SH |
| 833 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 834 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 835 |
#, no-wrap |
| 836 |
msgid "ERRORS" |
| 837 |
msgstr "ОШИБКИ" |
| 838 |
|
| 839 |
#. type: Plain text |
| 840 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 841 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 842 |
msgid "B<timerfd_create>() can fail with the following errors:" |
| 843 |
msgstr "Вызов B<timerfd_create>() может завершиться со следующими ошибками:" |
| 844 |
|
| 845 |
#. type: TP |
| 846 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 847 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 848 |
#, no-wrap |
| 849 |
msgid "B<EINVAL>" |
| 850 |
msgstr "B<EINVAL>" |
| 851 |
|
| 852 |
#. type: Plain text |
| 853 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 854 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 855 |
#, fuzzy |
| 856 |
#| msgid "I<timerid> is invalid." |
| 857 |
msgid "The I<clockid> is not valid." |
| 858 |
msgstr "Неверное значение I<timerid>." |
| 859 |
|
| 860 |
#. type: Plain text |
| 861 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 862 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 863 |
msgid "" |
| 864 |
"I<flags> is invalid; or, in Linux 2.6.26 or earlier, I<flags> is nonzero." |
| 865 |
msgstr "" |
| 866 |
"Неправильное значение I<flags> или, для Linux 2.6.26 и старее, I<flags> не " |
| 867 |
"равно 0." |
| 868 |
|
| 869 |
#. type: TP |
| 870 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 871 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 872 |
#, no-wrap |
| 873 |
msgid "B<EMFILE>" |
| 874 |
msgstr "B<EMFILE>" |
| 875 |
|
| 876 |
#. type: Plain text |
| 877 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 878 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 879 |
msgid "" |
| 880 |
"The per-process limit on the number of open file descriptors has been " |
| 881 |
"reached." |
| 882 |
msgstr "" |
| 883 |
"Было достигнуто ограничение по количеству открытых файловых дескрипторов на " |
| 884 |
"процесс." |
| 885 |
|
| 886 |
#. type: TP |
| 887 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 888 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 889 |
#, no-wrap |
| 890 |
msgid "B<ENFILE>" |
| 891 |
msgstr "B<ENFILE>" |
| 892 |
|
| 893 |
#. type: Plain text |
| 894 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 895 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 896 |
msgid "" |
| 897 |
"The system-wide limit on the total number of open files has been reached." |
| 898 |
msgstr "Достигнуто максимальное количество открытых файлов в системе." |
| 899 |
|
| 900 |
#. type: TP |
| 901 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 902 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 903 |
#, no-wrap |
| 904 |
msgid "B<ENODEV>" |
| 905 |
msgstr "B<ENODEV>" |
| 906 |
|
| 907 |
#. type: Plain text |
| 908 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 909 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 910 |
msgid "Could not mount (internal) anonymous inode device." |
| 911 |
msgstr "Не удалось смонтировать (внутреннее) безымянное устройство inode." |
| 912 |
|
| 913 |
#. type: TP |
| 914 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 915 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 916 |
#, no-wrap |
| 917 |
msgid "B<ENOMEM>" |
| 918 |
msgstr "B<ENOMEM>" |
| 919 |
|
| 920 |
#. type: Plain text |
| 921 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 922 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 923 |
msgid "There was insufficient kernel memory to create the timer." |
| 924 |
msgstr "Недостаточно памяти ядра для создания таймера." |
| 925 |
|
| 926 |
#. type: TP |
| 927 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 928 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 929 |
#, no-wrap |
| 930 |
msgid "B<EPERM>" |
| 931 |
msgstr "B<EPERM>" |
| 932 |
|
| 933 |
#. type: Plain text |
| 934 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 935 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 936 |
msgid "" |
| 937 |
"I<clockid> was B<CLOCK_REALTIME_ALARM> or B<CLOCK_BOOTTIME_ALARM> but the " |
| 938 |
"caller did not have the B<CAP_WAKE_ALARM> capability." |
| 939 |
msgstr "" |
| 940 |
|
| 941 |
#. type: Plain text |
| 942 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 943 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 944 |
msgid "" |
| 945 |
"B<timerfd_settime>() and B<timerfd_gettime>() can fail with the following " |
| 946 |
"errors:" |
| 947 |
msgstr "" |
| 948 |
"Вызовы B<timerfd_settime>() и B<timerfd_gettime>() могут завершаться со " |
| 949 |
"следующими ошибками:" |
| 950 |
|
| 951 |
#. type: TP |
| 952 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 953 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 954 |
#, no-wrap |
| 955 |
msgid "B<EBADF>" |
| 956 |
msgstr "B<EBADF>" |
| 957 |
|
| 958 |
#. type: Plain text |
| 959 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 960 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 961 |
msgid "I<fd> is not a valid file descriptor." |
| 962 |
msgstr "Значение I<fd> не является правильным файловым дескриптором." |
| 963 |
|
| 964 |
#. type: TP |
| 965 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 966 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 967 |
#, no-wrap |
| 968 |
msgid "B<EFAULT>" |
| 969 |
msgstr "B<EFAULT>" |
| 970 |
|
| 971 |
#. type: Plain text |
| 972 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 973 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 974 |
msgid "I<new_value>, I<old_value>, or I<curr_value> is not a valid pointer." |
| 975 |
msgstr "Некорректный указатель I<new_value>, I<old_value> или I<curr_value>." |
| 976 |
|
| 977 |
#. type: Plain text |
| 978 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 979 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 980 |
msgid "I<fd> is not a valid timerfd file descriptor." |
| 981 |
msgstr "Значение I<fd> не является правильным файловым дескриптором timerfd." |
| 982 |
|
| 983 |
#. type: Plain text |
| 984 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 985 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 986 |
msgid "B<timerfd_settime>() can also fail with the following errors:" |
| 987 |
msgstr "" |
| 988 |
"Вызов B<timerfd_settime>() также может завершиться со следующими ошибками:" |
| 989 |
|
| 990 |
#. type: TP |
| 991 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 992 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 993 |
#, no-wrap |
| 994 |
msgid "B<ECANCELED>" |
| 995 |
msgstr "B<ECANCELED>" |
| 996 |
|
| 997 |
#. type: Plain text |
| 998 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 999 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1000 |
msgid "See NOTES." |
| 1001 |
msgstr "Смотрите ЗАМЕЧАНИЯ." |
| 1002 |
|
| 1003 |
#. type: Plain text |
| 1004 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1005 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1006 |
msgid "" |
| 1007 |
"I<new_value> is not properly initialized (one of the I<tv_nsec> falls " |
| 1008 |
"outside the range zero to 999,999,999)." |
| 1009 |
msgstr "" |
| 1010 |
"Значение I<new_value> некорректно инициализировано (одно из I<tv_nsec> вне " |
| 1011 |
"диапазона от 0 до 999999999)." |
| 1012 |
|
| 1013 |
#. This case only checked since Linux 2.6.29, and Linux 2.2.2[78].some-stable-version. |
| 1014 |
#. In older kernel versions, no check was made for invalid flags. |
| 1015 |
#. type: Plain text |
| 1016 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1017 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1018 |
msgid "I<flags> is invalid." |
| 1019 |
msgstr "Значение I<flags> неверно." |
| 1020 |
|
| 1021 |
#. type: SH |
| 1022 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1023 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1024 |
#, no-wrap |
| 1025 |
msgid "STANDARDS" |
| 1026 |
msgstr "СТАНДАРТЫ" |
| 1027 |
|
| 1028 |
#. type: Plain text |
| 1029 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1030 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1031 |
msgid "Linux." |
| 1032 |
msgstr "Linux." |
| 1033 |
|
| 1034 |
#. type: SH |
| 1035 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1036 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1037 |
#, no-wrap |
| 1038 |
msgid "HISTORY" |
| 1039 |
msgstr "ИСТОРИЯ" |
| 1040 |
|
| 1041 |
#. type: Plain text |
| 1042 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1043 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1044 |
msgid "Linux 2.6.25, glibc 2.8." |
| 1045 |
msgstr "" |
| 1046 |
|
| 1047 |
#. type: SH |
| 1048 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1049 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1050 |
#, no-wrap |
| 1051 |
msgid "NOTES" |
| 1052 |
msgstr "ПРИМЕЧАНИЯ" |
| 1053 |
|
| 1054 |
#. type: Plain text |
| 1055 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1056 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1057 |
msgid "" |
| 1058 |
"Suppose the following scenario for B<CLOCK_REALTIME> or " |
| 1059 |
"B<CLOCK_REALTIME_ALARM> timer that was created with B<timerfd_create>():" |
| 1060 |
msgstr "" |
| 1061 |
|
| 1062 |
#. type: IP |
| 1063 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1064 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1065 |
#, no-wrap |
| 1066 |
msgid "(1)" |
| 1067 |
msgstr "(1)" |
| 1068 |
|
| 1069 |
#. type: Plain text |
| 1070 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1071 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1072 |
msgid "" |
| 1073 |
"The timer has been started (B<timerfd_settime>()) with the " |
| 1074 |
"B<TFD_TIMER_ABSTIME> and B<TFD_TIMER_CANCEL_ON_SET> flags;" |
| 1075 |
msgstr "" |
| 1076 |
|
| 1077 |
#. type: IP |
| 1078 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1079 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1080 |
#, no-wrap |
| 1081 |
msgid "(2)" |
| 1082 |
msgstr "(2)" |
| 1083 |
|
| 1084 |
#. type: Plain text |
| 1085 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1086 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1087 |
msgid "" |
| 1088 |
"A discontinuous change (e.g., B<settimeofday>(2)) is subsequently made to " |
| 1089 |
"the B<CLOCK_REALTIME> clock; and" |
| 1090 |
msgstr "" |
| 1091 |
|
| 1092 |
#. type: IP |
| 1093 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1094 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1095 |
#, no-wrap |
| 1096 |
msgid "(3)" |
| 1097 |
msgstr "(3)" |
| 1098 |
|
| 1099 |
#. type: Plain text |
| 1100 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1101 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1102 |
msgid "" |
| 1103 |
"the caller once more calls B<timerfd_settime>() to rearm the timer (without " |
| 1104 |
"first doing a B<read>(2) on the file descriptor)." |
| 1105 |
msgstr "" |
| 1106 |
|
| 1107 |
#. type: Plain text |
| 1108 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1109 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1110 |
#, fuzzy |
| 1111 |
#| msgid "Note the following:" |
| 1112 |
msgid "In this case the following occurs:" |
| 1113 |
msgstr "Также заметим следующее:" |
| 1114 |
|
| 1115 |
#. type: IP |
| 1116 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1117 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1118 |
#, no-wrap |
| 1119 |
msgid "\\[bu]" |
| 1120 |
msgstr "\\[bu]" |
| 1121 |
|
| 1122 |
#. type: Plain text |
| 1123 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1124 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1125 |
msgid "" |
| 1126 |
"The B<timerfd_settime>() returns -1 with I<errno> set to B<ECANCELED>. " |
| 1127 |
"(This enables the caller to know that the previous timer was affected by a " |
| 1128 |
"discontinuous change to the clock.)" |
| 1129 |
msgstr "" |
| 1130 |
|
| 1131 |
#. type: Plain text |
| 1132 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1133 |
#: opensuse-tumbleweed |
| 1134 |
msgid "" |
| 1135 |
"The timer I<is successfully rearmed> with the settings provided in the " |
| 1136 |
"second B<timerfd_settime>() call. (This was probably an implementation " |
| 1137 |
"accident, but won't be fixed now, in case there are applications that depend " |
| 1138 |
"on this behavior.)" |
| 1139 |
msgstr "" |
| 1140 |
|
| 1141 |
#. type: SH |
| 1142 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1143 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1144 |
#, no-wrap |
| 1145 |
msgid "BUGS" |
| 1146 |
msgstr "ПРОГРАММНЫЕ ОШИБКИ" |
| 1147 |
|
| 1148 |
#. 2.6.29 |
| 1149 |
#. type: Plain text |
| 1150 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1151 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1152 |
msgid "" |
| 1153 |
"Currently, B<timerfd_create>() supports fewer types of clock IDs than " |
| 1154 |
"B<timer_create>(2)." |
| 1155 |
msgstr "" |
| 1156 |
"В настоящее время B<timerfd_create>() поддерживает только несколько типов " |
| 1157 |
"идентификаторов часов, поддерживаемых B<timer_create>(2)." |
| 1158 |
|
| 1159 |
#. type: SH |
| 1160 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1161 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1162 |
#, no-wrap |
| 1163 |
msgid "EXAMPLES" |
| 1164 |
msgstr "ПРИМЕРЫ" |
| 1165 |
|
| 1166 |
#. type: Plain text |
| 1167 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1168 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1169 |
msgid "" |
| 1170 |
"The following program creates a timer and then monitors its progress. The " |
| 1171 |
"program accepts up to three command-line arguments. The first argument " |
| 1172 |
"specifies the number of seconds for the initial expiration of the timer. " |
| 1173 |
"The second argument specifies the interval for the timer, in seconds. The " |
| 1174 |
"third argument specifies the number of times the program should allow the " |
| 1175 |
"timer to expire before terminating. The second and third command-line " |
| 1176 |
"arguments are optional." |
| 1177 |
msgstr "" |
| 1178 |
"Следующая программа создаёт таймер и затем следит за его работой. Программа " |
| 1179 |
"получает до трёх аргументов из командной строки. В первом аргументе задаётся " |
| 1180 |
"количество секунд до первого срабатывания таймера. Во втором аргументе " |
| 1181 |
"задаётся интервал таймера в секундах. В третьем аргументе задаётся сколько " |
| 1182 |
"программа должна позволить сработать таймеру до завершения. Второй и третий " |
| 1183 |
"аргументы необязательны." |
| 1184 |
|
| 1185 |
#. type: Plain text |
| 1186 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1187 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1188 |
msgid "The following shell session demonstrates the use of the program:" |
| 1189 |
msgstr "Следующий сеанс работы в оболочке показывает работу с программой:" |
| 1190 |
|
| 1191 |
#. type: Plain text |
| 1192 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1193 |
#: opensuse-tumbleweed |
| 1194 |
#, fuzzy, no-wrap |
| 1195 |
#| msgid "" |
| 1196 |
#| "$B< a.out 3 1 100>\n" |
| 1197 |
#| "0.000: timer started\n" |
| 1198 |
#| "3.000: read: 1; total=1\n" |
| 1199 |
#| "4.000: read: 1; total=2\n" |
| 1200 |
#| "B<\\(haZ > # type control-Z to suspend the program\n" |
| 1201 |
#| "[1]+ Stopped ./timerfd3_demo 3 1 100\n" |
| 1202 |
#| "$ B<fg> # Resume execution after a few seconds\n" |
| 1203 |
#| "a.out 3 1 100\n" |
| 1204 |
#| "9.660: read: 5; total=7\n" |
| 1205 |
#| "10.000: read: 1; total=8\n" |
| 1206 |
#| "11.000: read: 1; total=9\n" |
| 1207 |
#| "B<\\(haC > # type control-C to suspend the program\n" |
| 1208 |
msgid "" |
| 1209 |
"$B< a.out 3 1 100>\n" |
| 1210 |
"0.000:\ttimer started\n" |
| 1211 |
"3.000:\tread: 1; total=1\n" |
| 1212 |
"4.000:\tread: 1; total=2\n" |
| 1213 |
"B<\\[ha]Z > # type control-Z to suspend the program\n" |
| 1214 |
"[1]+ Stopped ./timerfd3_demo 3 1 100\n" |
| 1215 |
"$ B<fg> # Resume execution after a few seconds\n" |
| 1216 |
"a.out 3 1 100\n" |
| 1217 |
"9.660:\tread: 5; total=7\n" |
| 1218 |
"10.000:\tread: 1; total=8\n" |
| 1219 |
"11.000:\tread: 1; total=9\n" |
| 1220 |
"B<\\[ha]C > # type control-C to suspend the program\n" |
| 1221 |
msgstr "" |
| 1222 |
"$B< a.out 3 1 100>\n" |
| 1223 |
"0.000: таймер запущен\n" |
| 1224 |
"3.000: read: 1; всего=1\n" |
| 1225 |
"4.000: read: 1; всего=2\n" |
| 1226 |
"B<\\(haZ > # нажато control-Z для приостанова программы\n" |
| 1227 |
"[1]+ Stopped ./timerfd3_demo 3 1 100\n" |
| 1228 |
"$ B<fg> # возобновление выполнения после нескольких\n" |
| 1229 |
" #секунд\n" |
| 1230 |
"a.out 3 1 100\n" |
| 1231 |
"9.660: read: 5; всего=7\n" |
| 1232 |
"10.000: read: 1; всего=8\n" |
| 1233 |
"11.000: read: 1; всего=9\n" |
| 1234 |
"B<\\(haC > # нажато control-C для приостанова программы\n" |
| 1235 |
|
| 1236 |
#. type: SS |
| 1237 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1238 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1239 |
#, no-wrap |
| 1240 |
msgid "Program source" |
| 1241 |
msgstr "Исходный код программы" |
| 1242 |
|
| 1243 |
# |
| 1244 |
# |
| 1245 |
# |
| 1246 |
# |
| 1247 |
# |
| 1248 |
# |
| 1249 |
# |
| 1250 |
#. The commented out code here is what we currently need until |
| 1251 |
#. the required stuff is in glibc |
| 1252 |
#. /* Link with \-lrt */ |
| 1253 |
#. #define _GNU_SOURCE |
| 1254 |
#. #include <sys/syscall.h> |
| 1255 |
#. #include <unistd.h> |
| 1256 |
#. #include <time.h> |
| 1257 |
#. #if defined(__i386__) |
| 1258 |
#. #define __NR_timerfd_create 322 |
| 1259 |
#. #define __NR_timerfd_settime 325 |
| 1260 |
#. #define __NR_timerfd_gettime 326 |
| 1261 |
#. #endif |
| 1262 |
#. static int |
| 1263 |
#. timerfd_create(int clockid, int flags) |
| 1264 |
#. { |
| 1265 |
#. return syscall(__NR_timerfd_create, clockid, flags); |
| 1266 |
#. } |
| 1267 |
#. static int |
| 1268 |
#. timerfd_settime(int fd, int flags, struct itimerspec *new_value, |
| 1269 |
#. struct itimerspec *curr_value) |
| 1270 |
#. { |
| 1271 |
#. return syscall(__NR_timerfd_settime, fd, flags, new_value, |
| 1272 |
#. curr_value); |
| 1273 |
#. } |
| 1274 |
#. static int |
| 1275 |
#. timerfd_gettime(int fd, struct itimerspec *curr_value) |
| 1276 |
#. { |
| 1277 |
#. return syscall(__NR_timerfd_gettime, fd, curr_value); |
| 1278 |
#. } |
| 1279 |
#. #define TFD_TIMER_ABSTIME (1 << 0) |
| 1280 |
#. //////////////////////////////////////////////////////////// |
| 1281 |
#. type: Plain text |
| 1282 |
#: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed |
| 1283 |
#, no-wrap |
| 1284 |
msgid "" |
| 1285 |
"#include E<lt>err.hE<gt>\n" |
| 1286 |
"#include E<lt>inttypes.hE<gt>\n" |
| 1287 |
"#include E<lt>stdio.hE<gt>\n" |
| 1288 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1289 |
"#include E<lt>sys/timerfd.hE<gt>\n" |
| 1290 |
"#include E<lt>sys/types.hE<gt>\n" |
| 1291 |
"#include E<lt>time.hE<gt>\n" |
| 1292 |
"#include E<lt>unistd.hE<gt>\n" |
| 1293 |
"\\&\n" |
| 1294 |
"static void\n" |
| 1295 |
"print_elapsed_time(void)\n" |
| 1296 |
"{\n" |
| 1297 |
" int secs, nsecs;\n" |
| 1298 |
" static int first_call = 1;\n" |
| 1299 |
" struct timespec curr;\n" |
| 1300 |
" static struct timespec start;\n" |
| 1301 |
"\\&\n" |
| 1302 |
" if (first_call) {\n" |
| 1303 |
" first_call = 0;\n" |
| 1304 |
" if (clock_gettime(CLOCK_MONOTONIC, &start) == -1)\n" |
| 1305 |
" err(EXIT_FAILURE, \"clock_gettime\");\n" |
| 1306 |
" }\n" |
| 1307 |
"\\&\n" |
| 1308 |
" if (clock_gettime(CLOCK_MONOTONIC, &curr) == -1)\n" |
| 1309 |
" err(EXIT_FAILURE, \"clock_gettime\");\n" |
| 1310 |
"\\&\n" |
| 1311 |
" secs = curr.tv_sec - start.tv_sec;\n" |
| 1312 |
" nsecs = curr.tv_nsec - start.tv_nsec;\n" |
| 1313 |
" if (nsecs E<lt> 0) {\n" |
| 1314 |
" secs--;\n" |
| 1315 |
" nsecs += 1000000000;\n" |
| 1316 |
" }\n" |
| 1317 |
" printf(\"%d.%03d:\\[rs]t\", secs, (nsecs + 500000) / 1000000);\n" |
| 1318 |
"}\n" |
| 1319 |
"\\&\n" |
| 1320 |
"int\n" |
| 1321 |
"main(int argc, char *argv[])\n" |
| 1322 |
"{\n" |
| 1323 |
" int fd;\n" |
| 1324 |
" ssize_t s;\n" |
| 1325 |
" uint64_t expir, tot_expir, max_expir;\n" |
| 1326 |
" struct timespec now;\n" |
| 1327 |
" struct itimerspec new_value;\n" |
| 1328 |
"\\&\n" |
| 1329 |
" if (argc != 2 && argc != 4) {\n" |
| 1330 |
" fprintf(stderr, \"%s init-secs [interval-secs max-num-expir]\\[rs]n\",\n" |
| 1331 |
" argv[0]);\n" |
| 1332 |
" exit(EXIT_FAILURE);\n" |
| 1333 |
" }\n" |
| 1334 |
"\\&\n" |
| 1335 |
" if (clock_gettime(CLOCK_REALTIME, &now) == -1)\n" |
| 1336 |
" err(EXIT_FAILURE, \"clock_gettime\");\n" |
| 1337 |
"\\&\n" |
| 1338 |
" /* Create a CLOCK_REALTIME absolute timer with initial\n" |
| 1339 |
" expiration and interval as specified in command line. */\n" |
| 1340 |
"\\&\n" |
| 1341 |
" new_value.it_value.tv_sec = now.tv_sec + atoi(argv[1]);\n" |
| 1342 |
" new_value.it_value.tv_nsec = now.tv_nsec;\n" |
| 1343 |
" if (argc == 2) {\n" |
| 1344 |
" new_value.it_interval.tv_sec = 0;\n" |
| 1345 |
" max_expir = 1;\n" |
| 1346 |
" } else {\n" |
| 1347 |
" new_value.it_interval.tv_sec = atoi(argv[2]);\n" |
| 1348 |
" max_expir = atoi(argv[3]);\n" |
| 1349 |
" }\n" |
| 1350 |
" new_value.it_interval.tv_nsec = 0;\n" |
| 1351 |
"\\&\n" |
| 1352 |
" fd = timerfd_create(CLOCK_REALTIME, 0);\n" |
| 1353 |
" if (fd == -1)\n" |
| 1354 |
" err(EXIT_FAILURE, \"timerfd_create\");\n" |
| 1355 |
"\\&\n" |
| 1356 |
" if (timerfd_settime(fd, TFD_TIMER_ABSTIME, &new_value, NULL) == -1)\n" |
| 1357 |
" err(EXIT_FAILURE, \"timerfd_settime\");\n" |
| 1358 |
"\\&\n" |
| 1359 |
" print_elapsed_time();\n" |
| 1360 |
" printf(\"timer started\\[rs]n\");\n" |
| 1361 |
"\\&\n" |
| 1362 |
" for (tot_expir = 0; tot_expir E<lt> max_expir;) {\n" |
| 1363 |
" s = read(fd, &expir, sizeof(uint64_t));\n" |
| 1364 |
" if (s != sizeof(uint64_t))\n" |
| 1365 |
" err(EXIT_FAILURE, \"read\");\n" |
| 1366 |
"\\&\n" |
| 1367 |
" tot_expir += expir;\n" |
| 1368 |
" print_elapsed_time();\n" |
| 1369 |
" printf(\"read: %w64u; total=%w64u\\[rs]n\", expir, tot_expir);\n" |
| 1370 |
" }\n" |
| 1371 |
"\\&\n" |
| 1372 |
" exit(EXIT_SUCCESS);\n" |
| 1373 |
"}\n" |
| 1374 |
msgstr "" |
| 1375 |
|
| 1376 |
#. SRC END |
| 1377 |
#. type: SH |
| 1378 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1379 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1380 |
#, no-wrap |
| 1381 |
msgid "SEE ALSO" |
| 1382 |
msgstr "СМОТРИТЕ ТАКЖЕ" |
| 1383 |
|
| 1384 |
#. type: Plain text |
| 1385 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1386 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1387 |
msgid "" |
| 1388 |
"B<eventfd>(2), B<poll>(2), B<read>(2), B<select>(2), B<setitimer>(2), " |
| 1389 |
"B<signalfd>(2), B<timer_create>(2), B<timer_gettime>(2), " |
| 1390 |
"B<timer_settime>(2), B<timespec>(3), B<epoll>(7), B<time>(7)" |
| 1391 |
msgstr "" |
| 1392 |
"B<eventfd>(2), B<poll>(2), B<read>(2), B<select>(2), B<setitimer>(2), " |
| 1393 |
"B<signalfd>(2), B<timer_create>(2), B<timer_gettime>(2), " |
| 1394 |
"B<timer_settime>(2), B<timespec>(3), B<epoll>(7), B<time>(7)" |
| 1395 |
|
| 1396 |
#. type: TH |
| 1397 |
#: debian-trixie |
| 1398 |
#, no-wrap |
| 1399 |
msgid "2024-06-15" |
| 1400 |
msgstr "15 июня 2024 г." |
| 1401 |
|
| 1402 |
#. type: TH |
| 1403 |
#: debian-trixie |
| 1404 |
#, no-wrap |
| 1405 |
msgid "Linux man-pages 6.9.1" |
| 1406 |
msgstr "Страницы руководства Linux 6.9.1" |
| 1407 |
|
| 1408 |
#. type: Plain text |
| 1409 |
#: debian-trixie |
| 1410 |
msgid "Standard C library (I<libc>, I<-lc>)" |
| 1411 |
msgstr "Стандартная библиотека языка C (I<libc>, I<-lc>)" |
| 1412 |
|
| 1413 |
#. type: Plain text |
| 1414 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1415 |
msgid "" |
| 1416 |
"The timer I<is successfully rearmed> with the settings provided in the " |
| 1417 |
"second B<timerfd_settime>() call. (This was probably an implementation " |
| 1418 |
"accident, but won't be fixed now, in case there are applications that depend " |
| 1419 |
"on this behaviour.)" |
| 1420 |
msgstr "" |
| 1421 |
|
| 1422 |
#. type: Plain text |
| 1423 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1424 |
#, fuzzy, no-wrap |
| 1425 |
#| msgid "" |
| 1426 |
#| "$B< a.out 3 1 100>\n" |
| 1427 |
#| "0.000: timer started\n" |
| 1428 |
#| "3.000: read: 1; total=1\n" |
| 1429 |
#| "4.000: read: 1; total=2\n" |
| 1430 |
#| "B<\\(haZ > # type control-Z to suspend the program\n" |
| 1431 |
#| "[1]+ Stopped ./timerfd3_demo 3 1 100\n" |
| 1432 |
#| "$ B<fg> # Resume execution after a few seconds\n" |
| 1433 |
#| "a.out 3 1 100\n" |
| 1434 |
#| "9.660: read: 5; total=7\n" |
| 1435 |
#| "10.000: read: 1; total=8\n" |
| 1436 |
#| "11.000: read: 1; total=9\n" |
| 1437 |
#| "B<\\(haC > # type control-C to suspend the program\n" |
| 1438 |
msgid "" |
| 1439 |
"$B< a.out 3 1 100>\n" |
| 1440 |
"0.000: timer started\n" |
| 1441 |
"3.000: read: 1; total=1\n" |
| 1442 |
"4.000: read: 1; total=2\n" |
| 1443 |
"B<\\[ha]Z > # type control-Z to suspend the program\n" |
| 1444 |
"[1]+ Stopped ./timerfd3_demo 3 1 100\n" |
| 1445 |
"$ B<fg> # Resume execution after a few seconds\n" |
| 1446 |
"a.out 3 1 100\n" |
| 1447 |
"9.660: read: 5; total=7\n" |
| 1448 |
"10.000: read: 1; total=8\n" |
| 1449 |
"11.000: read: 1; total=9\n" |
| 1450 |
"B<\\[ha]C > # type control-C to suspend the program\n" |
| 1451 |
msgstr "" |
| 1452 |
"$B< a.out 3 1 100>\n" |
| 1453 |
"0.000: таймер запущен\n" |
| 1454 |
"3.000: read: 1; всего=1\n" |
| 1455 |
"4.000: read: 1; всего=2\n" |
| 1456 |
"B<\\(haZ > # нажато control-Z для приостанова программы\n" |
| 1457 |
"[1]+ Stopped ./timerfd3_demo 3 1 100\n" |
| 1458 |
"$ B<fg> # возобновление выполнения после нескольких\n" |
| 1459 |
" #секунд\n" |
| 1460 |
"a.out 3 1 100\n" |
| 1461 |
"9.660: read: 5; всего=7\n" |
| 1462 |
"10.000: read: 1; всего=8\n" |
| 1463 |
"11.000: read: 1; всего=9\n" |
| 1464 |
"B<\\(haC > # нажато control-C для приостанова программы\n" |
| 1465 |
|
| 1466 |
# |
| 1467 |
# |
| 1468 |
# |
| 1469 |
# |
| 1470 |
# |
| 1471 |
# |
| 1472 |
# |
| 1473 |
#. The commented out code here is what we currently need until |
| 1474 |
#. the required stuff is in glibc |
| 1475 |
#. /* Link with \-lrt */ |
| 1476 |
#. #define _GNU_SOURCE |
| 1477 |
#. #include <sys/syscall.h> |
| 1478 |
#. #include <unistd.h> |
| 1479 |
#. #include <time.h> |
| 1480 |
#. #if defined(__i386__) |
| 1481 |
#. #define __NR_timerfd_create 322 |
| 1482 |
#. #define __NR_timerfd_settime 325 |
| 1483 |
#. #define __NR_timerfd_gettime 326 |
| 1484 |
#. #endif |
| 1485 |
#. static int |
| 1486 |
#. timerfd_create(int clockid, int flags) |
| 1487 |
#. { |
| 1488 |
#. return syscall(__NR_timerfd_create, clockid, flags); |
| 1489 |
#. } |
| 1490 |
#. static int |
| 1491 |
#. timerfd_settime(int fd, int flags, struct itimerspec *new_value, |
| 1492 |
#. struct itimerspec *curr_value) |
| 1493 |
#. { |
| 1494 |
#. return syscall(__NR_timerfd_settime, fd, flags, new_value, |
| 1495 |
#. curr_value); |
| 1496 |
#. } |
| 1497 |
#. static int |
| 1498 |
#. timerfd_gettime(int fd, struct itimerspec *curr_value) |
| 1499 |
#. { |
| 1500 |
#. return syscall(__NR_timerfd_gettime, fd, curr_value); |
| 1501 |
#. } |
| 1502 |
#. #define TFD_TIMER_ABSTIME (1 << 0) |
| 1503 |
#. //////////////////////////////////////////////////////////// |
| 1504 |
#. type: Plain text |
| 1505 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1506 |
#, no-wrap |
| 1507 |
msgid "" |
| 1508 |
"#include E<lt>err.hE<gt>\n" |
| 1509 |
"#include E<lt>inttypes.hE<gt>\n" |
| 1510 |
"#include E<lt>stdio.hE<gt>\n" |
| 1511 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1512 |
"#include E<lt>sys/timerfd.hE<gt>\n" |
| 1513 |
"#include E<lt>sys/types.hE<gt>\n" |
| 1514 |
"#include E<lt>time.hE<gt>\n" |
| 1515 |
"#include E<lt>unistd.hE<gt>\n" |
| 1516 |
"\\&\n" |
| 1517 |
"static void\n" |
| 1518 |
"print_elapsed_time(void)\n" |
| 1519 |
"{\n" |
| 1520 |
" int secs, nsecs;\n" |
| 1521 |
" static int first_call = 1;\n" |
| 1522 |
" struct timespec curr;\n" |
| 1523 |
" static struct timespec start;\n" |
| 1524 |
"\\&\n" |
| 1525 |
" if (first_call) {\n" |
| 1526 |
" first_call = 0;\n" |
| 1527 |
" if (clock_gettime(CLOCK_MONOTONIC, &start) == -1)\n" |
| 1528 |
" err(EXIT_FAILURE, \"clock_gettime\");\n" |
| 1529 |
" }\n" |
| 1530 |
"\\&\n" |
| 1531 |
" if (clock_gettime(CLOCK_MONOTONIC, &curr) == -1)\n" |
| 1532 |
" err(EXIT_FAILURE, \"clock_gettime\");\n" |
| 1533 |
"\\&\n" |
| 1534 |
" secs = curr.tv_sec - start.tv_sec;\n" |
| 1535 |
" nsecs = curr.tv_nsec - start.tv_nsec;\n" |
| 1536 |
" if (nsecs E<lt> 0) {\n" |
| 1537 |
" secs--;\n" |
| 1538 |
" nsecs += 1000000000;\n" |
| 1539 |
" }\n" |
| 1540 |
" printf(\"%d.%03d: \", secs, (nsecs + 500000) / 1000000);\n" |
| 1541 |
"}\n" |
| 1542 |
"\\&\n" |
| 1543 |
"int\n" |
| 1544 |
"main(int argc, char *argv[])\n" |
| 1545 |
"{\n" |
| 1546 |
" int fd;\n" |
| 1547 |
" ssize_t s;\n" |
| 1548 |
" uint64_t exp, tot_exp, max_exp;\n" |
| 1549 |
" struct timespec now;\n" |
| 1550 |
" struct itimerspec new_value;\n" |
| 1551 |
"\\&\n" |
| 1552 |
" if (argc != 2 && argc != 4) {\n" |
| 1553 |
" fprintf(stderr, \"%s init-secs [interval-secs max-exp]\\[rs]n\",\n" |
| 1554 |
" argv[0]);\n" |
| 1555 |
" exit(EXIT_FAILURE);\n" |
| 1556 |
" }\n" |
| 1557 |
"\\&\n" |
| 1558 |
" if (clock_gettime(CLOCK_REALTIME, &now) == -1)\n" |
| 1559 |
" err(EXIT_FAILURE, \"clock_gettime\");\n" |
| 1560 |
"\\&\n" |
| 1561 |
" /* Create a CLOCK_REALTIME absolute timer with initial\n" |
| 1562 |
" expiration and interval as specified in command line. */\n" |
| 1563 |
"\\&\n" |
| 1564 |
" new_value.it_value.tv_sec = now.tv_sec + atoi(argv[1]);\n" |
| 1565 |
" new_value.it_value.tv_nsec = now.tv_nsec;\n" |
| 1566 |
" if (argc == 2) {\n" |
| 1567 |
" new_value.it_interval.tv_sec = 0;\n" |
| 1568 |
" max_exp = 1;\n" |
| 1569 |
" } else {\n" |
| 1570 |
" new_value.it_interval.tv_sec = atoi(argv[2]);\n" |
| 1571 |
" max_exp = atoi(argv[3]);\n" |
| 1572 |
" }\n" |
| 1573 |
" new_value.it_interval.tv_nsec = 0;\n" |
| 1574 |
"\\&\n" |
| 1575 |
" fd = timerfd_create(CLOCK_REALTIME, 0);\n" |
| 1576 |
" if (fd == -1)\n" |
| 1577 |
" err(EXIT_FAILURE, \"timerfd_create\");\n" |
| 1578 |
"\\&\n" |
| 1579 |
" if (timerfd_settime(fd, TFD_TIMER_ABSTIME, &new_value, NULL) == -1)\n" |
| 1580 |
" err(EXIT_FAILURE, \"timerfd_settime\");\n" |
| 1581 |
"\\&\n" |
| 1582 |
" print_elapsed_time();\n" |
| 1583 |
" printf(\"timer started\\[rs]n\");\n" |
| 1584 |
"\\&\n" |
| 1585 |
" for (tot_exp = 0; tot_exp E<lt> max_exp;) {\n" |
| 1586 |
" s = read(fd, &exp, sizeof(uint64_t));\n" |
| 1587 |
" if (s != sizeof(uint64_t))\n" |
| 1588 |
" err(EXIT_FAILURE, \"read\");\n" |
| 1589 |
"\\&\n" |
| 1590 |
" tot_exp += exp;\n" |
| 1591 |
" print_elapsed_time();\n" |
| 1592 |
" printf(\"read: %\" PRIu64 \"; total=%\" PRIu64 \"\\[rs]n\", exp, tot_exp);\n" |
| 1593 |
" }\n" |
| 1594 |
"\\&\n" |
| 1595 |
" exit(EXIT_SUCCESS);\n" |
| 1596 |
"}\n" |
| 1597 |
msgstr "" |
| 1598 |
|
| 1599 |
#. type: TH |
| 1600 |
#: fedora-44 fedora-rawhide |
| 1601 |
#, no-wrap |
| 1602 |
msgid "2024-07-23" |
| 1603 |
msgstr "23 июля 2024 г." |
| 1604 |
|
| 1605 |
#. type: TH |
| 1606 |
#: fedora-44 fedora-rawhide |
| 1607 |
#, no-wrap |
| 1608 |
msgid "Linux man-pages 6.13" |
| 1609 |
msgstr "Страницы руководства Linux 6.13" |
| 1610 |
|
| 1611 |
#. type: TH |
| 1612 |
#: mageia-cauldron |
| 1613 |
#, no-wrap |
| 1614 |
msgid "2026-02-08" |
| 1615 |
msgstr "8 февраля 2026 г." |
| 1616 |
|
| 1617 |
#. type: TH |
| 1618 |
#: mageia-cauldron |
| 1619 |
#, no-wrap |
| 1620 |
msgid "Linux man-pages 6.17" |
| 1621 |
msgstr "Страницы руководства Linux 6.17" |
| 1622 |
|
| 1623 |
# |
| 1624 |
# |
| 1625 |
# |
| 1626 |
# |
| 1627 |
# |
| 1628 |
# |
| 1629 |
# |
| 1630 |
#. The commented out code here is what we currently need until |
| 1631 |
#. the required stuff is in glibc |
| 1632 |
#. /* Link with \-lrt */ |
| 1633 |
#. #define _GNU_SOURCE |
| 1634 |
#. #include <sys/syscall.h> |
| 1635 |
#. #include <unistd.h> |
| 1636 |
#. #include <time.h> |
| 1637 |
#. #if defined(__i386__) |
| 1638 |
#. #define __NR_timerfd_create 322 |
| 1639 |
#. #define __NR_timerfd_settime 325 |
| 1640 |
#. #define __NR_timerfd_gettime 326 |
| 1641 |
#. #endif |
| 1642 |
#. static int |
| 1643 |
#. timerfd_create(int clockid, int flags) |
| 1644 |
#. { |
| 1645 |
#. return syscall(__NR_timerfd_create, clockid, flags); |
| 1646 |
#. } |
| 1647 |
#. static int |
| 1648 |
#. timerfd_settime(int fd, int flags, struct itimerspec *new_value, |
| 1649 |
#. struct itimerspec *curr_value) |
| 1650 |
#. { |
| 1651 |
#. return syscall(__NR_timerfd_settime, fd, flags, new_value, |
| 1652 |
#. curr_value); |
| 1653 |
#. } |
| 1654 |
#. static int |
| 1655 |
#. timerfd_gettime(int fd, struct itimerspec *curr_value) |
| 1656 |
#. { |
| 1657 |
#. return syscall(__NR_timerfd_gettime, fd, curr_value); |
| 1658 |
#. } |
| 1659 |
#. #define TFD_TIMER_ABSTIME (1 << 0) |
| 1660 |
#. //////////////////////////////////////////////////////////// |
| 1661 |
#. type: Plain text |
| 1662 |
#: mageia-cauldron |
| 1663 |
#, no-wrap |
| 1664 |
msgid "" |
| 1665 |
"#include E<lt>err.hE<gt>\n" |
| 1666 |
"#include E<lt>inttypes.hE<gt>\n" |
| 1667 |
"#include E<lt>stdio.hE<gt>\n" |
| 1668 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1669 |
"#include E<lt>sys/timerfd.hE<gt>\n" |
| 1670 |
"#include E<lt>sys/types.hE<gt>\n" |
| 1671 |
"#include E<lt>time.hE<gt>\n" |
| 1672 |
"#include E<lt>unistd.hE<gt>\n" |
| 1673 |
"\\&\n" |
| 1674 |
"static void\n" |
| 1675 |
"print_elapsed_time(void)\n" |
| 1676 |
"{\n" |
| 1677 |
" int secs, nsecs;\n" |
| 1678 |
" static int first_call = 1;\n" |
| 1679 |
" struct timespec curr;\n" |
| 1680 |
" static struct timespec start;\n" |
| 1681 |
"\\&\n" |
| 1682 |
" if (first_call) {\n" |
| 1683 |
" first_call = 0;\n" |
| 1684 |
" if (clock_gettime(CLOCK_MONOTONIC, &start) == -1)\n" |
| 1685 |
" err(EXIT_FAILURE, \"clock_gettime\");\n" |
| 1686 |
" }\n" |
| 1687 |
"\\&\n" |
| 1688 |
" if (clock_gettime(CLOCK_MONOTONIC, &curr) == -1)\n" |
| 1689 |
" err(EXIT_FAILURE, \"clock_gettime\");\n" |
| 1690 |
"\\&\n" |
| 1691 |
" secs = curr.tv_sec - start.tv_sec;\n" |
| 1692 |
" nsecs = curr.tv_nsec - start.tv_nsec;\n" |
| 1693 |
" if (nsecs E<lt> 0) {\n" |
| 1694 |
" secs--;\n" |
| 1695 |
" nsecs += 1000000000;\n" |
| 1696 |
" }\n" |
| 1697 |
" printf(\"%d.%03d:\\[rs]t\", secs, (nsecs + 500000) / 1000000);\n" |
| 1698 |
"}\n" |
| 1699 |
"\\&\n" |
| 1700 |
"int\n" |
| 1701 |
"main(int argc, char *argv[])\n" |
| 1702 |
"{\n" |
| 1703 |
" int fd;\n" |
| 1704 |
" ssize_t s;\n" |
| 1705 |
" uint64_t expir, tot_expir, max_expir;\n" |
| 1706 |
" struct timespec now;\n" |
| 1707 |
" struct itimerspec new_value;\n" |
| 1708 |
"\\&\n" |
| 1709 |
" if (argc != 2 && argc != 4) {\n" |
| 1710 |
" fprintf(stderr, \"%s init-secs [interval-secs max-num-expir]\\[rs]n\",\n" |
| 1711 |
" argv[0]);\n" |
| 1712 |
" exit(EXIT_FAILURE);\n" |
| 1713 |
" }\n" |
| 1714 |
"\\&\n" |
| 1715 |
" if (clock_gettime(CLOCK_REALTIME, &now) == -1)\n" |
| 1716 |
" err(EXIT_FAILURE, \"clock_gettime\");\n" |
| 1717 |
"\\&\n" |
| 1718 |
" /* Create a CLOCK_REALTIME absolute timer with initial\n" |
| 1719 |
" expiration and interval as specified in command line. */\n" |
| 1720 |
"\\&\n" |
| 1721 |
" new_value.it_value.tv_sec = now.tv_sec + atoi(argv[1]);\n" |
| 1722 |
" new_value.it_value.tv_nsec = now.tv_nsec;\n" |
| 1723 |
" if (argc == 2) {\n" |
| 1724 |
" new_value.it_interval.tv_sec = 0;\n" |
| 1725 |
" max_expir = 1;\n" |
| 1726 |
" } else {\n" |
| 1727 |
" new_value.it_interval.tv_sec = atoi(argv[2]);\n" |
| 1728 |
" max_expir = atoi(argv[3]);\n" |
| 1729 |
" }\n" |
| 1730 |
" new_value.it_interval.tv_nsec = 0;\n" |
| 1731 |
"\\&\n" |
| 1732 |
" fd = timerfd_create(CLOCK_REALTIME, 0);\n" |
| 1733 |
" if (fd == -1)\n" |
| 1734 |
" err(EXIT_FAILURE, \"timerfd_create\");\n" |
| 1735 |
"\\&\n" |
| 1736 |
" if (timerfd_settime(fd, TFD_TIMER_ABSTIME, &new_value, NULL) == -1)\n" |
| 1737 |
" err(EXIT_FAILURE, \"timerfd_settime\");\n" |
| 1738 |
"\\&\n" |
| 1739 |
" print_elapsed_time();\n" |
| 1740 |
" printf(\"timer started\\[rs]n\");\n" |
| 1741 |
"\\&\n" |
| 1742 |
" for (tot_expir = 0; tot_expir E<lt> max_expir;) {\n" |
| 1743 |
" s = read(fd, &expir, sizeof(uint64_t));\n" |
| 1744 |
" if (s != sizeof(uint64_t))\n" |
| 1745 |
" err(EXIT_FAILURE, \"read\");\n" |
| 1746 |
"\\&\n" |
| 1747 |
" tot_expir += expir;\n" |
| 1748 |
" print_elapsed_time();\n" |
| 1749 |
" printf(\"read: %\" PRIu64 \"; total=%\" PRIu64 \"\\[rs]n\",\n" |
| 1750 |
" expir, tot_expir);\n" |
| 1751 |
" }\n" |
| 1752 |
"\\&\n" |
| 1753 |
" exit(EXIT_SUCCESS);\n" |
| 1754 |
"}\n" |
| 1755 |
msgstr "" |
| 1756 |
|
| 1757 |
#. type: TH |
| 1758 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1759 |
#, no-wrap |
| 1760 |
msgid "Linux man-pages (unreleased)" |
| 1761 |
msgstr "Страницы руководства Linux (не выпущены)" |