| 1 |
# SOME DESCRIPTIVE TITLE |
| 2 |
# Copyright (C) YEAR Free Software Foundation, Inc. |
| 3 |
# This file is distributed under the same license as the PACKAGE package. |
| 4 |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
| 5 |
# |
| 6 |
#, fuzzy |
| 7 |
msgid "" |
| 8 |
msgstr "" |
| 9 |
"Project-Id-Version: PACKAGE VERSION\n" |
| 10 |
"POT-Creation-Date: 2026-06-05 06:49+0200\n" |
| 11 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
| 12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
| 13 |
"Language-Team: LANGUAGE <[email protected]>\n" |
| 14 |
"Language: \n" |
| 15 |
"MIME-Version: 1.0\n" |
| 16 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 17 |
"Content-Transfer-Encoding: 8bit\n" |
| 18 |
|
| 19 |
#. type: TH |
| 20 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 21 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 22 |
#, no-wrap |
| 23 |
msgid "timer_create" |
| 24 |
msgstr "" |
| 25 |
|
| 26 |
#. type: TH |
| 27 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 28 |
#: opensuse-tumbleweed |
| 29 |
#, no-wrap |
| 30 |
msgid "2025-10-29" |
| 31 |
msgstr "" |
| 32 |
|
| 33 |
#. type: TH |
| 34 |
#: archlinux debian-unstable |
| 35 |
#, no-wrap |
| 36 |
msgid "Linux man-pages 6.18" |
| 37 |
msgstr "" |
| 38 |
|
| 39 |
#. type: SH |
| 40 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 41 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 42 |
#, no-wrap |
| 43 |
msgid "NAME" |
| 44 |
msgstr "" |
| 45 |
|
| 46 |
#. type: Plain text |
| 47 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 48 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 49 |
msgid "timer_create - create a POSIX per-process timer" |
| 50 |
msgstr "" |
| 51 |
|
| 52 |
#. type: SH |
| 53 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 54 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 55 |
#, no-wrap |
| 56 |
msgid "LIBRARY" |
| 57 |
msgstr "" |
| 58 |
|
| 59 |
#. type: Plain text |
| 60 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 61 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 62 |
msgid "Real-time library (I<librt>,\\ I<-lrt>)" |
| 63 |
msgstr "" |
| 64 |
|
| 65 |
#. type: SH |
| 66 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 67 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 68 |
#, no-wrap |
| 69 |
msgid "SYNOPSIS" |
| 70 |
msgstr "" |
| 71 |
|
| 72 |
#. type: Plain text |
| 73 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 74 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 75 |
#, no-wrap |
| 76 |
msgid "" |
| 77 |
"B<#include E<lt>signal.hE<gt>> /* Definition of B<SIGEV_*> constants */\n" |
| 78 |
"B<#include E<lt>time.hE<gt>>\n" |
| 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 "" |
| 86 |
"B<int timer_create(clockid_t >I<clockid>B<,>\n" |
| 87 |
"B< struct sigevent *_Nullable restrict >I<sevp>B<,>\n" |
| 88 |
"B< timer_t *restrict >I<timerid>B<);>\n" |
| 89 |
msgstr "" |
| 90 |
|
| 91 |
#. type: Plain text |
| 92 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 93 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 94 |
msgid "" |
| 95 |
"Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):" |
| 96 |
msgstr "" |
| 97 |
|
| 98 |
#. type: Plain text |
| 99 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 100 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 101 |
msgid "B<timer_create>():" |
| 102 |
msgstr "" |
| 103 |
|
| 104 |
#. type: Plain text |
| 105 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 106 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 107 |
#, no-wrap |
| 108 |
msgid " _POSIX_C_SOURCE E<gt>= 199309L\n" |
| 109 |
msgstr "" |
| 110 |
|
| 111 |
#. type: SH |
| 112 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 113 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 114 |
#, no-wrap |
| 115 |
msgid "DESCRIPTION" |
| 116 |
msgstr "" |
| 117 |
|
| 118 |
#. type: Plain text |
| 119 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 120 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 121 |
msgid "" |
| 122 |
"B<timer_create>() creates a new per-process interval timer. The ID of the " |
| 123 |
"new timer is returned in the buffer pointed to by I<timerid>, which must be " |
| 124 |
"a non-null pointer. This ID is unique within the process, until the timer " |
| 125 |
"is deleted. The new timer is initially disarmed." |
| 126 |
msgstr "" |
| 127 |
|
| 128 |
#. type: Plain text |
| 129 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 130 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 131 |
msgid "" |
| 132 |
"The I<clockid> argument specifies the clock that the new timer uses to " |
| 133 |
"measure time. It can be specified as one of the following values:" |
| 134 |
msgstr "" |
| 135 |
|
| 136 |
#. type: TP |
| 137 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 138 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 139 |
#, no-wrap |
| 140 |
msgid "B<CLOCK_REALTIME>" |
| 141 |
msgstr "" |
| 142 |
|
| 143 |
#. type: Plain text |
| 144 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 145 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 146 |
msgid "A settable system-wide real-time clock." |
| 147 |
msgstr "" |
| 148 |
|
| 149 |
#. type: TP |
| 150 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 151 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 152 |
#, no-wrap |
| 153 |
msgid "B<CLOCK_MONOTONIC>" |
| 154 |
msgstr "" |
| 155 |
|
| 156 |
#. Note: the CLOCK_MONOTONIC_RAW clock added for clock_gettime() |
| 157 |
#. in Linux 2.6.28 is not supported for POSIX timers -- mtk, Feb 2009 |
| 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 |
"A nonsettable monotonically increasing clock that measures time from some " |
| 163 |
"unspecified point in the past that does not change after system startup." |
| 164 |
msgstr "" |
| 165 |
|
| 166 |
#. type: TP |
| 167 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 168 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 169 |
#, no-wrap |
| 170 |
msgid "B<CLOCK_PROCESS_CPUTIME_ID> (since Linux 2.6.12)" |
| 171 |
msgstr "" |
| 172 |
|
| 173 |
#. type: Plain text |
| 174 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 175 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 176 |
msgid "" |
| 177 |
"A clock that measures (user and system) CPU time consumed by (all of the " |
| 178 |
"threads in) the calling process." |
| 179 |
msgstr "" |
| 180 |
|
| 181 |
#. type: TP |
| 182 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 183 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 184 |
#, no-wrap |
| 185 |
msgid "B<CLOCK_THREAD_CPUTIME_ID> (since Linux 2.6.12)" |
| 186 |
msgstr "" |
| 187 |
|
| 188 |
#. The CLOCK_MONOTONIC_RAW that was added in Linux 2.6.28 can't be used |
| 189 |
#. to create a timer -- mtk, Feb 2009 |
| 190 |
#. type: Plain text |
| 191 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 192 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 193 |
msgid "" |
| 194 |
"A clock that measures (user and system) CPU time consumed by the calling " |
| 195 |
"thread." |
| 196 |
msgstr "" |
| 197 |
|
| 198 |
#. type: TP |
| 199 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 200 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 201 |
#, no-wrap |
| 202 |
msgid "B<CLOCK_BOOTTIME> (Since Linux 2.6.39)" |
| 203 |
msgstr "" |
| 204 |
|
| 205 |
#. commit 70a08cca1227dc31c784ec930099a4417a06e7d0 |
| 206 |
#. type: Plain text |
| 207 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 208 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 209 |
msgid "" |
| 210 |
"Like B<CLOCK_MONOTONIC>, this is a monotonically increasing clock. However, " |
| 211 |
"whereas the B<CLOCK_MONOTONIC> clock does not measure the time while a " |
| 212 |
"system is suspended, the B<CLOCK_BOOTTIME> clock does include the time " |
| 213 |
"during which the system is suspended. This is useful for applications that " |
| 214 |
"need to be suspend-aware. B<CLOCK_REALTIME> is not suitable for such " |
| 215 |
"applications, since that clock is affected by discontinuous changes to the " |
| 216 |
"system clock." |
| 217 |
msgstr "" |
| 218 |
|
| 219 |
#. type: TP |
| 220 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 221 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 222 |
#, no-wrap |
| 223 |
msgid "B<CLOCK_REALTIME_ALARM> (since Linux 3.0)" |
| 224 |
msgstr "" |
| 225 |
|
| 226 |
#. commit 9a7adcf5c6dea63d2e47e6f6d2f7a6c9f48b9337 |
| 227 |
#. type: Plain text |
| 228 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 229 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 230 |
msgid "" |
| 231 |
"This clock is like B<CLOCK_REALTIME>, but will wake the system if it is " |
| 232 |
"suspended. The caller must have the B<CAP_WAKE_ALARM> capability in order " |
| 233 |
"to set a timer against this clock." |
| 234 |
msgstr "" |
| 235 |
|
| 236 |
#. type: TP |
| 237 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 238 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 239 |
#, no-wrap |
| 240 |
msgid "B<CLOCK_BOOTTIME_ALARM> (since Linux 3.0)" |
| 241 |
msgstr "" |
| 242 |
|
| 243 |
#. commit 9a7adcf5c6dea63d2e47e6f6d2f7a6c9f48b9337 |
| 244 |
#. type: Plain text |
| 245 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 246 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 247 |
msgid "" |
| 248 |
"This clock is like B<CLOCK_BOOTTIME>, but will wake the system if it is " |
| 249 |
"suspended. The caller must have the B<CAP_WAKE_ALARM> capability in order " |
| 250 |
"to set a timer against this clock." |
| 251 |
msgstr "" |
| 252 |
|
| 253 |
#. type: TP |
| 254 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 255 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 256 |
#, no-wrap |
| 257 |
msgid "B<CLOCK_TAI> (since Linux 3.10)" |
| 258 |
msgstr "" |
| 259 |
|
| 260 |
#. type: Plain text |
| 261 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 262 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 263 |
msgid "" |
| 264 |
"A system-wide clock derived from wall-clock time but counting leap seconds." |
| 265 |
msgstr "" |
| 266 |
|
| 267 |
#. type: Plain text |
| 268 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 269 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 270 |
msgid "See B<clock_getres>(2) for some further details on the above clocks." |
| 271 |
msgstr "" |
| 272 |
|
| 273 |
#. type: Plain text |
| 274 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 275 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 276 |
msgid "" |
| 277 |
"As well as the above values, I<clockid> can be specified as the I<clockid> " |
| 278 |
"returned by a call to B<clock_getcpuclockid>(3) or " |
| 279 |
"B<pthread_getcpuclockid>(3)." |
| 280 |
msgstr "" |
| 281 |
|
| 282 |
#. type: Plain text |
| 283 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 284 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 285 |
msgid "" |
| 286 |
"The I<sevp> argument points to a I<sigevent> structure that specifies how " |
| 287 |
"the caller should be notified when the timer expires. For the definition " |
| 288 |
"and general details of this structure, see B<sigevent>(3type)." |
| 289 |
msgstr "" |
| 290 |
|
| 291 |
#. type: Plain text |
| 292 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 293 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 294 |
msgid "The I<sevp.sigev_notify> field can have the following values:" |
| 295 |
msgstr "" |
| 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<SIGEV_NONE>" |
| 302 |
msgstr "" |
| 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 |
"Don't asynchronously notify when the timer expires. Progress of the timer " |
| 309 |
"can be monitored using B<timer_gettime>(2)." |
| 310 |
msgstr "" |
| 311 |
|
| 312 |
#. type: TP |
| 313 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 314 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 315 |
#, no-wrap |
| 316 |
msgid "B<SIGEV_SIGNAL>" |
| 317 |
msgstr "" |
| 318 |
|
| 319 |
#. type: Plain text |
| 320 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 321 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 322 |
msgid "" |
| 323 |
"Upon timer expiration, generate the signal I<sigev_signo> for the process. " |
| 324 |
"See B<sigevent>(3type) for general details. The I<si_code> field of the " |
| 325 |
"I<siginfo_t> structure will be set to B<SI_TIMER>. At any point in time, at " |
| 326 |
"most one signal is queued to the process for a given timer; see " |
| 327 |
"B<timer_getoverrun>(2) for more details." |
| 328 |
msgstr "" |
| 329 |
|
| 330 |
#. type: TP |
| 331 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 332 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 333 |
#, no-wrap |
| 334 |
msgid "B<SIGEV_THREAD>" |
| 335 |
msgstr "" |
| 336 |
|
| 337 |
#. type: Plain text |
| 338 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 339 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 340 |
msgid "" |
| 341 |
"Upon timer expiration, invoke I<sigev_notify_function> as if it were the " |
| 342 |
"start function of a new thread. See B<sigevent>(3type) for details." |
| 343 |
msgstr "" |
| 344 |
|
| 345 |
#. type: TP |
| 346 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 347 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 348 |
#, no-wrap |
| 349 |
msgid "B<SIGEV_THREAD_ID> (Linux-specific)" |
| 350 |
msgstr "" |
| 351 |
|
| 352 |
#. type: Plain text |
| 353 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 354 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 355 |
msgid "" |
| 356 |
"As for B<SIGEV_SIGNAL>, but the signal is targeted at the thread whose ID is " |
| 357 |
"given in I<sigev_notify_thread_id>, which must be a thread in the same " |
| 358 |
"process as the caller. The I<sigev_notify_thread_id> field specifies a " |
| 359 |
"kernel thread ID, that is, the value returned by B<clone>(2) or " |
| 360 |
"B<gettid>(2). This flag is intended only for use by threading libraries." |
| 361 |
msgstr "" |
| 362 |
|
| 363 |
#. type: Plain text |
| 364 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 365 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 366 |
msgid "" |
| 367 |
"Specifying I<sevp> as NULL is equivalent to specifying a pointer to a " |
| 368 |
"I<sigevent> structure in which I<sigev_notify> is B<SIGEV_SIGNAL>, " |
| 369 |
"I<sigev_signo> is B<SIGALRM>, and I<sigev_value.sival_int> is the timer ID." |
| 370 |
msgstr "" |
| 371 |
|
| 372 |
#. type: SH |
| 373 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 374 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 375 |
#, no-wrap |
| 376 |
msgid "RETURN VALUE" |
| 377 |
msgstr "" |
| 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 |
"On success, B<timer_create>() returns 0, and the ID of the new timer is " |
| 384 |
"placed in I<*timerid>. On failure, -1 is returned, and I<errno> is set to " |
| 385 |
"indicate the error." |
| 386 |
msgstr "" |
| 387 |
|
| 388 |
#. type: SH |
| 389 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 390 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 391 |
#, no-wrap |
| 392 |
msgid "ERRORS" |
| 393 |
msgstr "" |
| 394 |
|
| 395 |
#. type: TP |
| 396 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 397 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 398 |
#, no-wrap |
| 399 |
msgid "B<EAGAIN>" |
| 400 |
msgstr "" |
| 401 |
|
| 402 |
#. type: Plain text |
| 403 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 404 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 405 |
msgid "Temporary error during kernel allocation of timer structures." |
| 406 |
msgstr "" |
| 407 |
|
| 408 |
#. type: TP |
| 409 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 410 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 411 |
#, no-wrap |
| 412 |
msgid "B<EINVAL>" |
| 413 |
msgstr "" |
| 414 |
|
| 415 |
#. type: Plain text |
| 416 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 417 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 418 |
msgid "" |
| 419 |
"Clock ID, I<sigev_notify>, I<sigev_signo>, or I<sigev_notify_thread_id> is " |
| 420 |
"invalid." |
| 421 |
msgstr "" |
| 422 |
|
| 423 |
#. type: TP |
| 424 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 425 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 426 |
#, no-wrap |
| 427 |
msgid "B<ENOMEM>" |
| 428 |
msgstr "" |
| 429 |
|
| 430 |
#. glibc layer: malloc() |
| 431 |
#. type: Plain text |
| 432 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 433 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 434 |
msgid "Could not allocate memory." |
| 435 |
msgstr "" |
| 436 |
|
| 437 |
#. type: TP |
| 438 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 439 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 440 |
#, no-wrap |
| 441 |
msgid "B<ENOTSUP>" |
| 442 |
msgstr "" |
| 443 |
|
| 444 |
#. type: Plain text |
| 445 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 446 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 447 |
msgid "The kernel does not support creating a timer against this I<clockid>." |
| 448 |
msgstr "" |
| 449 |
|
| 450 |
#. type: TP |
| 451 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 452 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 453 |
#, no-wrap |
| 454 |
msgid "B<EPERM>" |
| 455 |
msgstr "" |
| 456 |
|
| 457 |
#. type: Plain text |
| 458 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 459 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 460 |
msgid "" |
| 461 |
"I<clockid> was B<CLOCK_REALTIME_ALARM> or B<CLOCK_BOOTTIME_ALARM> but the " |
| 462 |
"caller did not have the B<CAP_WAKE_ALARM> capability." |
| 463 |
msgstr "" |
| 464 |
|
| 465 |
#. type: SH |
| 466 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 467 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 468 |
#, no-wrap |
| 469 |
msgid "VERSIONS" |
| 470 |
msgstr "" |
| 471 |
|
| 472 |
#. type: SS |
| 473 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 474 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 475 |
#, no-wrap |
| 476 |
msgid "C library/kernel differences" |
| 477 |
msgstr "" |
| 478 |
|
| 479 |
#. See nptl/sysdeps/unix/sysv/linux/timer_create.c |
| 480 |
#. type: Plain text |
| 481 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 482 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 483 |
msgid "" |
| 484 |
"Part of the implementation of the POSIX timers API is provided by glibc. In " |
| 485 |
"particular:" |
| 486 |
msgstr "" |
| 487 |
|
| 488 |
#. type: IP |
| 489 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 490 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 491 |
#, no-wrap |
| 492 |
msgid "\\[bu]" |
| 493 |
msgstr "" |
| 494 |
|
| 495 |
#. type: Plain text |
| 496 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 497 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 498 |
msgid "" |
| 499 |
"Much of the functionality for B<SIGEV_THREAD> is implemented within glibc, " |
| 500 |
"rather than the kernel. (This is necessarily so, since the thread involved " |
| 501 |
"in handling the notification is one that must be managed by the C library " |
| 502 |
"POSIX threads implementation.) Although the notification delivered to the " |
| 503 |
"process is via a thread, internally the NPTL implementation uses a " |
| 504 |
"I<sigev_notify> value of B<SIGEV_THREAD_ID> along with a real-time signal " |
| 505 |
"that is reserved by the implementation (see B<nptl>(7))." |
| 506 |
msgstr "" |
| 507 |
|
| 508 |
#. type: Plain text |
| 509 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 510 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 511 |
msgid "" |
| 512 |
"The implementation of the default case where I<evp> is NULL is handled " |
| 513 |
"inside glibc, which invokes the underlying system call with a suitably " |
| 514 |
"populated I<sigevent> structure." |
| 515 |
msgstr "" |
| 516 |
|
| 517 |
#. See the glibc source file kernel-posix-timers.h for the structure |
| 518 |
#. that glibc uses to map user-space timer IDs to kernel timer IDs |
| 519 |
#. The kernel-level timer ID is exposed via siginfo.si_tid. |
| 520 |
#. type: Plain text |
| 521 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 522 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 523 |
msgid "" |
| 524 |
"The timer IDs presented at user level are maintained by glibc, which maps " |
| 525 |
"these IDs to the timer IDs employed by the kernel." |
| 526 |
msgstr "" |
| 527 |
|
| 528 |
#. type: SH |
| 529 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 530 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 531 |
#, no-wrap |
| 532 |
msgid "STANDARDS" |
| 533 |
msgstr "" |
| 534 |
|
| 535 |
#. type: Plain text |
| 536 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 537 |
#: opensuse-tumbleweed |
| 538 |
msgid "POSIX.1-2024." |
| 539 |
msgstr "" |
| 540 |
|
| 541 |
#. type: SH |
| 542 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 543 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 544 |
#, no-wrap |
| 545 |
msgid "HISTORY" |
| 546 |
msgstr "" |
| 547 |
|
| 548 |
#. type: Plain text |
| 549 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 550 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 551 |
msgid "Linux 2.6. POSIX.1-2001." |
| 552 |
msgstr "" |
| 553 |
|
| 554 |
#. glibc commit 93a78ac437ba44f493333d7e2a4b0249839ce460 |
| 555 |
#. type: Plain text |
| 556 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 557 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 558 |
msgid "" |
| 559 |
"Prior to Linux 2.6, glibc provided an incomplete user-space implementation " |
| 560 |
"(B<CLOCK_REALTIME> timers only) using POSIX threads, and before glibc 2.17, " |
| 561 |
"the implementation falls back to this technique on systems running kernels " |
| 562 |
"older than Linux 2.6." |
| 563 |
msgstr "" |
| 564 |
|
| 565 |
#. type: SH |
| 566 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 567 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 568 |
#, no-wrap |
| 569 |
msgid "NOTES" |
| 570 |
msgstr "" |
| 571 |
|
| 572 |
#. type: Plain text |
| 573 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 574 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 575 |
msgid "A program may create multiple interval timers using B<timer_create>()." |
| 576 |
msgstr "" |
| 577 |
|
| 578 |
#. type: Plain text |
| 579 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 580 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 581 |
msgid "" |
| 582 |
"Timers are not inherited by the child of a B<fork>(2), and are disarmed and " |
| 583 |
"deleted during an B<execve>(2)." |
| 584 |
msgstr "" |
| 585 |
|
| 586 |
#. type: Plain text |
| 587 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 588 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 589 |
msgid "" |
| 590 |
"The kernel preallocates a \"queued real-time signal\" for each timer created " |
| 591 |
"using B<timer_create>(). Consequently, the number of timers is limited by " |
| 592 |
"the B<RLIMIT_SIGPENDING> resource limit (see B<setrlimit>(2))." |
| 593 |
msgstr "" |
| 594 |
|
| 595 |
#. type: Plain text |
| 596 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 597 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 598 |
msgid "" |
| 599 |
"The timers created by B<timer_create>() are commonly known as \"POSIX " |
| 600 |
"(interval) timers\". The POSIX timers API consists of the following " |
| 601 |
"interfaces:" |
| 602 |
msgstr "" |
| 603 |
|
| 604 |
#. type: TP |
| 605 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 606 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 607 |
#, no-wrap |
| 608 |
msgid "B<timer_create>()" |
| 609 |
msgstr "" |
| 610 |
|
| 611 |
#. type: Plain text |
| 612 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 613 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 614 |
msgid "Create a timer." |
| 615 |
msgstr "" |
| 616 |
|
| 617 |
#. type: TP |
| 618 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 619 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 620 |
#, no-wrap |
| 621 |
msgid "B<timer_settime>(2)" |
| 622 |
msgstr "" |
| 623 |
|
| 624 |
#. type: Plain text |
| 625 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 626 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 627 |
msgid "Arm (start) or disarm (stop) a timer." |
| 628 |
msgstr "" |
| 629 |
|
| 630 |
#. type: TP |
| 631 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 632 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 633 |
#, no-wrap |
| 634 |
msgid "B<timer_gettime>(2)" |
| 635 |
msgstr "" |
| 636 |
|
| 637 |
#. type: Plain text |
| 638 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 639 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 640 |
msgid "" |
| 641 |
"Fetch the time remaining until the next expiration of a timer, along with " |
| 642 |
"the interval setting of the timer." |
| 643 |
msgstr "" |
| 644 |
|
| 645 |
#. type: TP |
| 646 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 647 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 648 |
#, no-wrap |
| 649 |
msgid "B<timer_getoverrun>(2)" |
| 650 |
msgstr "" |
| 651 |
|
| 652 |
#. type: Plain text |
| 653 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 654 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 655 |
msgid "Return the overrun count for the last timer expiration." |
| 656 |
msgstr "" |
| 657 |
|
| 658 |
#. type: TP |
| 659 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 660 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 661 |
#, no-wrap |
| 662 |
msgid "B<timer_delete>(2)" |
| 663 |
msgstr "" |
| 664 |
|
| 665 |
#. type: Plain text |
| 666 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 667 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 668 |
msgid "Disarm and delete a timer." |
| 669 |
msgstr "" |
| 670 |
|
| 671 |
#. type: Plain text |
| 672 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 673 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 674 |
msgid "" |
| 675 |
"Since Linux 3.10, the I</proc/>pidI</timers> file can be used to list the " |
| 676 |
"POSIX timers for the process with PID I<pid>. See B<proc>(5) for further " |
| 677 |
"information." |
| 678 |
msgstr "" |
| 679 |
|
| 680 |
#. baa73d9e478ff32d62f3f9422822b59dd9a95a21 |
| 681 |
#. type: Plain text |
| 682 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 683 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 684 |
msgid "" |
| 685 |
"Since Linux 4.10, support for POSIX timers is a configurable option that is " |
| 686 |
"enabled by default. Kernel support can be disabled via the " |
| 687 |
"B<CONFIG_POSIX_TIMERS> option." |
| 688 |
msgstr "" |
| 689 |
|
| 690 |
#. type: SH |
| 691 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 692 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 693 |
#, no-wrap |
| 694 |
msgid "EXAMPLES" |
| 695 |
msgstr "" |
| 696 |
|
| 697 |
#. type: Plain text |
| 698 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 699 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 700 |
msgid "" |
| 701 |
"The program below takes two arguments: a sleep period in seconds, and a " |
| 702 |
"timer frequency in nanoseconds. The program establishes a handler for the " |
| 703 |
"signal it uses for the timer, blocks that signal, creates and arms a timer " |
| 704 |
"that expires with the given frequency, sleeps for the specified number of " |
| 705 |
"seconds, and then unblocks the timer signal. Assuming that the timer " |
| 706 |
"expired at least once while the program slept, the signal handler will be " |
| 707 |
"invoked, and the handler displays some information about the timer " |
| 708 |
"notification. The program terminates after one invocation of the signal " |
| 709 |
"handler." |
| 710 |
msgstr "" |
| 711 |
|
| 712 |
#. type: Plain text |
| 713 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 714 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 715 |
msgid "" |
| 716 |
"In the following example run, the program sleeps for 1 second, after " |
| 717 |
"creating a timer that has a frequency of 100 nanoseconds. By the time the " |
| 718 |
"signal is unblocked and delivered, there have been around ten million " |
| 719 |
"overruns." |
| 720 |
msgstr "" |
| 721 |
|
| 722 |
#. type: Plain text |
| 723 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 724 |
#: opensuse-tumbleweed |
| 725 |
#, no-wrap |
| 726 |
msgid "" |
| 727 |
"$B< ./a.out 1 100>;\n" |
| 728 |
"Establishing handler for signal 34\n" |
| 729 |
"Blocking signal 34\n" |
| 730 |
"timer ID is 0x804c008\n" |
| 731 |
"Sleeping for 1 seconds\n" |
| 732 |
"Unblocking signal 34\n" |
| 733 |
"Caught signal 34\n" |
| 734 |
" sival_ptr = 0xbfb174f4; *sival_ptr = 0x804c008\n" |
| 735 |
" overrun count = 10004886\n" |
| 736 |
msgstr "" |
| 737 |
|
| 738 |
#. type: SS |
| 739 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 740 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 741 |
#, no-wrap |
| 742 |
msgid "Program source" |
| 743 |
msgstr "" |
| 744 |
|
| 745 |
#. type: Plain text |
| 746 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 747 |
#: opensuse-tumbleweed |
| 748 |
#, no-wrap |
| 749 |
msgid "" |
| 750 |
"#include E<lt>err.hE<gt>\n" |
| 751 |
"#include E<lt>signal.hE<gt>\n" |
| 752 |
"#include E<lt>stdint.hE<gt>\n" |
| 753 |
"#include E<lt>stdio.hE<gt>\n" |
| 754 |
"#include E<lt>stdlib.hE<gt>\n" |
| 755 |
"#include E<lt>time.hE<gt>\n" |
| 756 |
"#include E<lt>unistd.hE<gt>\n" |
| 757 |
"\\&\n" |
| 758 |
"#define CLOCKID CLOCK_REALTIME\n" |
| 759 |
"#define SIG SIGRTMIN\n" |
| 760 |
"\\&\n" |
| 761 |
"static void\n" |
| 762 |
"print_siginfo(siginfo_t *si)\n" |
| 763 |
"{\n" |
| 764 |
" int or;\n" |
| 765 |
" timer_t *tidp;\n" |
| 766 |
"\\&\n" |
| 767 |
" tidp = si-E<gt>si_value.sival_ptr;\n" |
| 768 |
"\\&\n" |
| 769 |
" printf(\" sival_ptr = %p; \", si-E<gt>si_value.sival_ptr);\n" |
| 770 |
" printf(\" *sival_ptr = %#jx\\[rs]n\", (uintmax_t) *tidp);\n" |
| 771 |
"\\&\n" |
| 772 |
" or = timer_getoverrun(*tidp);\n" |
| 773 |
" if (or == -1)\n" |
| 774 |
" err(EXIT_FAILURE, \"timer_getoverrun\");\n" |
| 775 |
"\\&\n" |
| 776 |
" printf(\" overrun count = %d\\[rs]n\", or);\n" |
| 777 |
"}\n" |
| 778 |
"\\&\n" |
| 779 |
"static void\n" |
| 780 |
"handler(int sig, siginfo_t *si, void *uc)\n" |
| 781 |
"{\n" |
| 782 |
" /* Note: calling printf() from a signal handler is not safe\n" |
| 783 |
" (and should not be done in production programs), since\n" |
| 784 |
" printf() is not async-signal-safe; see signal-safety(7).\n" |
| 785 |
" Nevertheless, we use printf() here as a simple way of\n" |
| 786 |
" showing that the handler was called. */\n" |
| 787 |
"\\&\n" |
| 788 |
" printf(\"Caught signal %d\\[rs]n\", sig);\n" |
| 789 |
" print_siginfo(si);\n" |
| 790 |
" signal(sig, SIG_IGN);\n" |
| 791 |
"}\n" |
| 792 |
"\\&\n" |
| 793 |
"int\n" |
| 794 |
"main(int argc, char *argv[])\n" |
| 795 |
"{\n" |
| 796 |
" timer_t timerid;\n" |
| 797 |
" sigset_t mask;\n" |
| 798 |
" long long freq_nanosecs;\n" |
| 799 |
" struct sigevent sev;\n" |
| 800 |
" struct sigaction sa;\n" |
| 801 |
" struct itimerspec its;\n" |
| 802 |
"\\&\n" |
| 803 |
" if (argc != 3) {\n" |
| 804 |
" fprintf(stderr, \"Usage: %s E<lt>sleep-secsE<gt> E<lt>freq-nanosecsE<gt>\\[rs]n\",\n" |
| 805 |
" argv[0]);\n" |
| 806 |
" exit(EXIT_FAILURE);\n" |
| 807 |
" }\n" |
| 808 |
"\\&\n" |
| 809 |
" /* Establish handler for timer signal. */\n" |
| 810 |
"\\&\n" |
| 811 |
" printf(\"Establishing handler for signal %d\\[rs]n\", SIG);\n" |
| 812 |
" sa.sa_flags = SA_SIGINFO;\n" |
| 813 |
" sa.sa_sigaction = handler;\n" |
| 814 |
" sigemptyset(&sa.sa_mask);\n" |
| 815 |
" if (sigaction(SIG, &sa, NULL) == -1)\n" |
| 816 |
" err(EXIT_FAILURE, \"sigaction\");\n" |
| 817 |
"\\&\n" |
| 818 |
" /* Block timer signal temporarily. */\n" |
| 819 |
"\\&\n" |
| 820 |
" printf(\"Blocking signal %d\\[rs]n\", SIG);\n" |
| 821 |
" sigemptyset(&mask);\n" |
| 822 |
" sigaddset(&mask, SIG);\n" |
| 823 |
" if (sigprocmask(SIG_SETMASK, &mask, NULL) == -1)\n" |
| 824 |
" err(EXIT_FAILURE, \"sigprocmask\");\n" |
| 825 |
"\\&\n" |
| 826 |
" /* Create the timer. */\n" |
| 827 |
"\\&\n" |
| 828 |
" sev.sigev_notify = SIGEV_SIGNAL;\n" |
| 829 |
" sev.sigev_signo = SIG;\n" |
| 830 |
" sev.sigev_value.sival_ptr = &timerid;\n" |
| 831 |
" if (timer_create(CLOCKID, &sev, &timerid) == -1)\n" |
| 832 |
" err(EXIT_FAILURE, \"timer_create\");\n" |
| 833 |
"\\&\n" |
| 834 |
" printf(\"timer ID is %#jx\\[rs]n\", (uintmax_t) timerid);\n" |
| 835 |
"\\&\n" |
| 836 |
" /* Start the timer. */\n" |
| 837 |
"\\&\n" |
| 838 |
" freq_nanosecs = atoll(argv[2]);\n" |
| 839 |
" its.it_value.tv_sec = freq_nanosecs / 1000000000;\n" |
| 840 |
" its.it_value.tv_nsec = freq_nanosecs % 1000000000;\n" |
| 841 |
" its.it_interval.tv_sec = its.it_value.tv_sec;\n" |
| 842 |
" its.it_interval.tv_nsec = its.it_value.tv_nsec;\n" |
| 843 |
"\\&\n" |
| 844 |
" if (timer_settime(timerid, 0, &its, NULL) == -1)\n" |
| 845 |
" err(EXIT_FAILURE, \"timer_settime\");\n" |
| 846 |
"\\&\n" |
| 847 |
" /* Sleep for a while; meanwhile, the timer may expire\n" |
| 848 |
" multiple times. */\n" |
| 849 |
"\\&\n" |
| 850 |
" printf(\"Sleeping for %d seconds\\[rs]n\", atoi(argv[1]));\n" |
| 851 |
" sleep(atoi(argv[1]));\n" |
| 852 |
"\\&\n" |
| 853 |
" /* Unlock the timer signal, so that timer notification\n" |
| 854 |
" can be delivered. */\n" |
| 855 |
"\\&\n" |
| 856 |
" printf(\"Unblocking signal %d\\[rs]n\", SIG);\n" |
| 857 |
" if (sigprocmask(SIG_UNBLOCK, &mask, NULL) == -1)\n" |
| 858 |
" err(EXIT_FAILURE, \"sigprocmask\");\n" |
| 859 |
"\\&\n" |
| 860 |
" exit(EXIT_SUCCESS);\n" |
| 861 |
"}\n" |
| 862 |
msgstr "" |
| 863 |
|
| 864 |
#. SRC END |
| 865 |
#. type: SH |
| 866 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 867 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 868 |
#, no-wrap |
| 869 |
msgid "SEE ALSO" |
| 870 |
msgstr "" |
| 871 |
|
| 872 |
#. type: Plain text |
| 873 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 874 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 875 |
msgid "" |
| 876 |
"B<clock_gettime>(2), B<setitimer>(2), B<timer_delete>(2), " |
| 877 |
"B<timer_getoverrun>(2), B<timer_settime>(2), B<timerfd_create>(2), " |
| 878 |
"B<clock_getcpuclockid>(3), B<pthread_getcpuclockid>(3), B<pthreads>(7), " |
| 879 |
"B<sigevent>(3type), B<signal>(7), B<time>(7)" |
| 880 |
msgstr "" |
| 881 |
|
| 882 |
#. type: TH |
| 883 |
#: debian-trixie |
| 884 |
#, no-wrap |
| 885 |
msgid "2024-06-15" |
| 886 |
msgstr "" |
| 887 |
|
| 888 |
#. type: TH |
| 889 |
#: debian-trixie |
| 890 |
#, no-wrap |
| 891 |
msgid "Linux man-pages 6.9.1" |
| 892 |
msgstr "" |
| 893 |
|
| 894 |
#. type: Plain text |
| 895 |
#: debian-trixie |
| 896 |
msgid "Real-time library (I<librt>, I<-lrt>)" |
| 897 |
msgstr "" |
| 898 |
|
| 899 |
#. type: Plain text |
| 900 |
#: debian-trixie fedora-44 fedora-rawhide |
| 901 |
msgid "POSIX.1-2008." |
| 902 |
msgstr "" |
| 903 |
|
| 904 |
#. type: Plain text |
| 905 |
#: debian-trixie fedora-44 fedora-rawhide |
| 906 |
#, no-wrap |
| 907 |
msgid "" |
| 908 |
"$ B<./a.out 1 100>\n" |
| 909 |
"Establishing handler for signal 34\n" |
| 910 |
"Blocking signal 34\n" |
| 911 |
"timer ID is 0x804c008\n" |
| 912 |
"Sleeping for 1 seconds\n" |
| 913 |
"Unblocking signal 34\n" |
| 914 |
"Caught signal 34\n" |
| 915 |
" sival_ptr = 0xbfb174f4; *sival_ptr = 0x804c008\n" |
| 916 |
" overrun count = 10004886\n" |
| 917 |
msgstr "" |
| 918 |
|
| 919 |
#. type: Plain text |
| 920 |
#: debian-trixie fedora-44 fedora-rawhide |
| 921 |
#, no-wrap |
| 922 |
msgid "" |
| 923 |
"#include E<lt>signal.hE<gt>\n" |
| 924 |
"#include E<lt>stdint.hE<gt>\n" |
| 925 |
"#include E<lt>stdio.hE<gt>\n" |
| 926 |
"#include E<lt>stdlib.hE<gt>\n" |
| 927 |
"#include E<lt>time.hE<gt>\n" |
| 928 |
"#include E<lt>unistd.hE<gt>\n" |
| 929 |
"\\&\n" |
| 930 |
"#define CLOCKID CLOCK_REALTIME\n" |
| 931 |
"#define SIG SIGRTMIN\n" |
| 932 |
"\\&\n" |
| 933 |
"#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\[rs]\n" |
| 934 |
" } while (0)\n" |
| 935 |
"\\&\n" |
| 936 |
"static void\n" |
| 937 |
"print_siginfo(siginfo_t *si)\n" |
| 938 |
"{\n" |
| 939 |
" int or;\n" |
| 940 |
" timer_t *tidp;\n" |
| 941 |
"\\&\n" |
| 942 |
" tidp = si-E<gt>si_value.sival_ptr;\n" |
| 943 |
"\\&\n" |
| 944 |
" printf(\" sival_ptr = %p; \", si-E<gt>si_value.sival_ptr);\n" |
| 945 |
" printf(\" *sival_ptr = %#jx\\[rs]n\", (uintmax_t) *tidp);\n" |
| 946 |
"\\&\n" |
| 947 |
" or = timer_getoverrun(*tidp);\n" |
| 948 |
" if (or == -1)\n" |
| 949 |
" errExit(\"timer_getoverrun\");\n" |
| 950 |
" else\n" |
| 951 |
" printf(\" overrun count = %d\\[rs]n\", or);\n" |
| 952 |
"}\n" |
| 953 |
"\\&\n" |
| 954 |
"static void\n" |
| 955 |
"handler(int sig, siginfo_t *si, void *uc)\n" |
| 956 |
"{\n" |
| 957 |
" /* Note: calling printf() from a signal handler is not safe\n" |
| 958 |
" (and should not be done in production programs), since\n" |
| 959 |
" printf() is not async-signal-safe; see signal-safety(7).\n" |
| 960 |
" Nevertheless, we use printf() here as a simple way of\n" |
| 961 |
" showing that the handler was called. */\n" |
| 962 |
"\\&\n" |
| 963 |
" printf(\"Caught signal %d\\[rs]n\", sig);\n" |
| 964 |
" print_siginfo(si);\n" |
| 965 |
" signal(sig, SIG_IGN);\n" |
| 966 |
"}\n" |
| 967 |
"\\&\n" |
| 968 |
"int\n" |
| 969 |
"main(int argc, char *argv[])\n" |
| 970 |
"{\n" |
| 971 |
" timer_t timerid;\n" |
| 972 |
" sigset_t mask;\n" |
| 973 |
" long long freq_nanosecs;\n" |
| 974 |
" struct sigevent sev;\n" |
| 975 |
" struct sigaction sa;\n" |
| 976 |
" struct itimerspec its;\n" |
| 977 |
"\\&\n" |
| 978 |
" if (argc != 3) {\n" |
| 979 |
" fprintf(stderr, \"Usage: %s E<lt>sleep-secsE<gt> E<lt>freq-nanosecsE<gt>\\[rs]n\",\n" |
| 980 |
" argv[0]);\n" |
| 981 |
" exit(EXIT_FAILURE);\n" |
| 982 |
" }\n" |
| 983 |
"\\&\n" |
| 984 |
" /* Establish handler for timer signal. */\n" |
| 985 |
"\\&\n" |
| 986 |
" printf(\"Establishing handler for signal %d\\[rs]n\", SIG);\n" |
| 987 |
" sa.sa_flags = SA_SIGINFO;\n" |
| 988 |
" sa.sa_sigaction = handler;\n" |
| 989 |
" sigemptyset(&sa.sa_mask);\n" |
| 990 |
" if (sigaction(SIG, &sa, NULL) == -1)\n" |
| 991 |
" errExit(\"sigaction\");\n" |
| 992 |
"\\&\n" |
| 993 |
" /* Block timer signal temporarily. */\n" |
| 994 |
"\\&\n" |
| 995 |
" printf(\"Blocking signal %d\\[rs]n\", SIG);\n" |
| 996 |
" sigemptyset(&mask);\n" |
| 997 |
" sigaddset(&mask, SIG);\n" |
| 998 |
" if (sigprocmask(SIG_SETMASK, &mask, NULL) == -1)\n" |
| 999 |
" errExit(\"sigprocmask\");\n" |
| 1000 |
"\\&\n" |
| 1001 |
" /* Create the timer. */\n" |
| 1002 |
"\\&\n" |
| 1003 |
" sev.sigev_notify = SIGEV_SIGNAL;\n" |
| 1004 |
" sev.sigev_signo = SIG;\n" |
| 1005 |
" sev.sigev_value.sival_ptr = &timerid;\n" |
| 1006 |
" if (timer_create(CLOCKID, &sev, &timerid) == -1)\n" |
| 1007 |
" errExit(\"timer_create\");\n" |
| 1008 |
"\\&\n" |
| 1009 |
" printf(\"timer ID is %#jx\\[rs]n\", (uintmax_t) timerid);\n" |
| 1010 |
"\\&\n" |
| 1011 |
" /* Start the timer. */\n" |
| 1012 |
"\\&\n" |
| 1013 |
" freq_nanosecs = atoll(argv[2]);\n" |
| 1014 |
" its.it_value.tv_sec = freq_nanosecs / 1000000000;\n" |
| 1015 |
" its.it_value.tv_nsec = freq_nanosecs % 1000000000;\n" |
| 1016 |
" its.it_interval.tv_sec = its.it_value.tv_sec;\n" |
| 1017 |
" its.it_interval.tv_nsec = its.it_value.tv_nsec;\n" |
| 1018 |
"\\&\n" |
| 1019 |
" if (timer_settime(timerid, 0, &its, NULL) == -1)\n" |
| 1020 |
" errExit(\"timer_settime\");\n" |
| 1021 |
"\\&\n" |
| 1022 |
" /* Sleep for a while; meanwhile, the timer may expire\n" |
| 1023 |
" multiple times. */\n" |
| 1024 |
"\\&\n" |
| 1025 |
" printf(\"Sleeping for %d seconds\\[rs]n\", atoi(argv[1]));\n" |
| 1026 |
" sleep(atoi(argv[1]));\n" |
| 1027 |
"\\&\n" |
| 1028 |
" /* Unlock the timer signal, so that timer notification\n" |
| 1029 |
" can be delivered. */\n" |
| 1030 |
"\\&\n" |
| 1031 |
" printf(\"Unblocking signal %d\\[rs]n\", SIG);\n" |
| 1032 |
" if (sigprocmask(SIG_UNBLOCK, &mask, NULL) == -1)\n" |
| 1033 |
" errExit(\"sigprocmask\");\n" |
| 1034 |
"\\&\n" |
| 1035 |
" exit(EXIT_SUCCESS);\n" |
| 1036 |
"}\n" |
| 1037 |
msgstr "" |
| 1038 |
|
| 1039 |
#. type: TH |
| 1040 |
#: fedora-44 fedora-rawhide |
| 1041 |
#, no-wrap |
| 1042 |
msgid "2024-07-23" |
| 1043 |
msgstr "" |
| 1044 |
|
| 1045 |
#. type: TH |
| 1046 |
#: fedora-44 fedora-rawhide |
| 1047 |
#, no-wrap |
| 1048 |
msgid "Linux man-pages 6.13" |
| 1049 |
msgstr "" |
| 1050 |
|
| 1051 |
#. type: TH |
| 1052 |
#: mageia-cauldron |
| 1053 |
#, no-wrap |
| 1054 |
msgid "Linux man-pages 6.17" |
| 1055 |
msgstr "" |
| 1056 |
|
| 1057 |
#. type: TH |
| 1058 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1059 |
#, no-wrap |
| 1060 |
msgid "Linux man-pages (unreleased)" |
| 1061 |
msgstr "" |