Debian Codegraph @

po/ro/man3/pthread_getcpuclockid.3.po

raw
1 # Romanian translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Remus-Gabriel Chelu <[email protected]>, 2024, 2025.
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: manpages-l10n 4.21.0\n"
8 "POT-Creation-Date: 2026-06-05 06:38+0200\n"
9 "PO-Revision-Date: 2025-11-05 19:26+0100\n"
10 "Last-Translator: Remus-Gabriel Chelu <[email protected]>\n"
11 "Language-Team: Romanian <[email protected]>\n"
12 "Language: ro\n"
13 "MIME-Version: 1.0\n"
14 "Content-Type: text/plain; charset=UTF-8\n"
15 "Content-Transfer-Encoding: 8bit\n"
16 "Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < "
17 "20)) ? 1 : 2;\n"
18 "X-Generator: Poedit 3.6\n"
19
20 #. type: TH
21 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
22 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
23 #, no-wrap
24 msgid "pthread_getcpuclockid"
25 msgstr "pthread_getcpuclockid"
26
27 #. type: TH
28 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
29 #: opensuse-tumbleweed
30 #, no-wrap
31 msgid "2025-08-20"
32 msgstr "20 august 2025"
33
34 #. type: TH
35 #: archlinux debian-unstable
36 #, no-wrap
37 msgid "Linux man-pages 6.18"
38 msgstr "Pagini de manual de Linux 6.18"
39
40 #. type: SH
41 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
42 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
43 #, no-wrap
44 msgid "NAME"
45 msgstr "NUME"
46
47 #. type: Plain text
48 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
49 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
50 msgid "pthread_getcpuclockid - retrieve ID of a thread's CPU time clock"
51 msgstr ""
52 "pthread_getcpuclockid - recuperează ID-ul ceasului de timp CPU al unui fir "
53 "de execuție"
54
55 #. type: SH
56 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
57 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
58 #, no-wrap
59 msgid "LIBRARY"
60 msgstr "BIBLIOTECA"
61
62 #. type: Plain text
63 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
64 #: opensuse-leap-16-1 opensuse-tumbleweed
65 msgid "POSIX threads library (I<libpthread>,\\ I<-lpthread>)"
66 msgstr "Biblioteca de fire de execuție POSIX (I<libpthread>, I<-lpthread>)"
67
68 #. type: SH
69 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
70 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
71 #, no-wrap
72 msgid "SYNOPSIS"
73 msgstr "SINOPSIS"
74
75 #. type: Plain text
76 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
77 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
78 #, no-wrap
79 msgid ""
80 "B<#include E<lt>pthread.hE<gt>>\n"
81 "B<#include E<lt>time.hE<gt>>\n"
82 msgstr ""
83 "B<#include E<lt>pthread.hE<gt>>\n"
84 "B<#include E<lt>time.hE<gt>>\n"
85
86 #. type: Plain text
87 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
88 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
89 #, no-wrap
90 msgid "B<int pthread_getcpuclockid(pthread_t >I<thread>B<, clockid_t *>I<clockid>B<);>\n"
91 msgstr "B<int pthread_getcpuclockid(pthread_t >I<thread>B<, clockid_t *>I<clockid>B<);>\n"
92
93 #. type: SH
94 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
95 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
96 #, no-wrap
97 msgid "DESCRIPTION"
98 msgstr "DESCRIERE"
99
100 #. The clockid is constructed as follows:
101 #. *clockid = CLOCK_THREAD_CPUTIME_ID | (pd->tid << CLOCK_IDFIELD_SIZE)
102 #. where CLOCK_IDFIELD_SIZE is 3.
103 #. type: Plain text
104 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
105 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
106 msgid ""
107 "The B<pthread_getcpuclockid>() function obtains the ID of the CPU-time "
108 "clock of the thread whose ID is given in I<thread>, and returns it in the "
109 "location pointed to by I<clockid>."
110 msgstr ""
111 "Funcția B<pthread_getcpuclockid>() obține ID-ul ceasului de timp CPU al "
112 "firului al cărui ID este dat în I<thread> și îl returnează în locația "
113 "indicată de I<clockid>."
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 "RETURN VALUE"
120 msgstr "VALOAREA RETURNATĂ"
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 "On success, this function returns 0; on error, it returns a nonzero error "
127 "number."
128 msgstr ""
129 "În caz de succes, această funcție returnează 0; în caz de eroare, returnează "
130 "un număr de eroare diferit de zero."
131
132 #. type: SH
133 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
134 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
135 #, no-wrap
136 msgid "ERRORS"
137 msgstr "ERORI-IEȘIRE"
138
139 #. type: TP
140 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
141 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
142 #, no-wrap
143 msgid "B<ENOENT>"
144 msgstr "B<ENOENT>"
145
146 #
147 #. CLOCK_THREAD_CPUTIME_ID not defined
148 #. Looking at nptl/pthread_getcpuclockid.c an ERANGE error would
149 #. be possible if kernel thread IDs took more than 29 bits (which
150 #. they currently cannot).
151 #. type: Plain text
152 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
153 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
154 msgid "Per-thread CPU time clocks are not supported by the system."
155 msgstr "Sistemul nu acceptă ceasuri de timp pentru fiecare fir de procesor."
156
157 #. type: TP
158 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
159 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
160 #, no-wrap
161 msgid "B<ESRCH>"
162 msgstr "B<ESRCH>"
163
164 #. type: Plain text
165 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
166 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
167 msgid "No thread with the ID I<thread> could be found."
168 msgstr ""
169 "Nu a putut fi găsit niciun fir de execuție cu identificatorul I<thread>."
170
171 #. type: SH
172 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
173 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
174 #, no-wrap
175 msgid "ATTRIBUTES"
176 msgstr "ATRIBUTE"
177
178 #. type: Plain text
179 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
180 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
181 msgid ""
182 "For an explanation of the terms used in this section, see B<attributes>(7)."
183 msgstr ""
184 "Pentru o explicație a termenilor folosiți în această secțiune, a se vedea "
185 "B<attributes>(7)."
186
187 #. type: tbl table
188 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
189 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
190 #, no-wrap
191 msgid "Interface"
192 msgstr "Interfață"
193
194 #. type: tbl table
195 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
196 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
197 #, no-wrap
198 msgid "Attribute"
199 msgstr "Atribut"
200
201 #. type: tbl table
202 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
203 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
204 #, no-wrap
205 msgid "Value"
206 msgstr "Valoare"
207
208 #. type: tbl table
209 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
210 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
211 #, no-wrap
212 msgid ".na\n"
213 msgstr ".na\n"
214
215 #. type: tbl table
216 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
217 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
218 #, no-wrap
219 msgid ".nh\n"
220 msgstr ".nh\n"
221
222 #. type: tbl table
223 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
224 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
225 #, no-wrap
226 msgid "B<pthread_getcpuclockid>()"
227 msgstr "B<pthread_getcpuclockid>()"
228
229 #. type: tbl table
230 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
231 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
232 #, no-wrap
233 msgid "Thread safety"
234 msgstr "Siguranța firelor"
235
236 #. type: tbl table
237 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
238 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
239 #, no-wrap
240 msgid "MT-Safe"
241 msgstr "MT-Safe"
242
243 #. type: SH
244 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
245 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
246 #, no-wrap
247 msgid "STANDARDS"
248 msgstr "STANDARDE"
249
250 #. type: Plain text
251 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
252 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
253 msgid "POSIX.1-2008."
254 msgstr "POSIX.1-2008."
255
256 #. type: SH
257 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
258 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
259 #, no-wrap
260 msgid "HISTORY"
261 msgstr "ISTORIC"
262
263 #. type: Plain text
264 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
265 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
266 msgid "glibc 2.2. POSIX.1-2001."
267 msgstr "glibc 2.2. POSIX.1-2001."
268
269 #. type: SH
270 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
271 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
272 #, no-wrap
273 msgid "NOTES"
274 msgstr "NOTE"
275
276 #. type: Plain text
277 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
278 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
279 msgid ""
280 "When I<thread> refers to the calling thread, this function returns an "
281 "identifier that refers to the same clock manipulated by B<clock_gettime>(2) "
282 "and B<clock_settime>(2) when given the clock ID B<CLOCK_THREAD_CPUTIME_ID>."
283 msgstr ""
284 "Atunci când I<thread> se referă la firul apelant, această funcție returnează "
285 "un identificator care se referă la același ceas manipulat de "
286 "B<clock_gettime>(2) și B<clock_settime>(2) atunci când i se dă ID-ul "
287 "ceasului B<CLOCK_THREAD_CPUTIME_ID>."
288
289 #. type: SH
290 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
291 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
292 #, no-wrap
293 msgid "EXAMPLES"
294 msgstr "EXEMPLE"
295
296 #. type: Plain text
297 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
298 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
299 msgid ""
300 "The program below creates a thread and then uses B<clock_gettime>(2) to "
301 "retrieve the total process CPU time, and the per-thread CPU time consumed by "
302 "the two threads. The following shell session shows an example run:"
303 msgstr ""
304 "Programul de mai jos creează un fir de execuție și apoi utilizează "
305 "B<clock_gettime>(2) pentru a prelua timpul total de procesare al "
306 "procesorului și timpul de procesare consumat de cele două fire de execuție "
307 "pentru fiecare fir. Următoarea sesiune shell arată un exemplu de execuție:"
308
309 #. type: Plain text
310 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
311 #: opensuse-tumbleweed
312 #, no-wrap
313 msgid ""
314 "$B< ./a.out>;\n"
315 "Main thread sleeping\n"
316 "Subthread starting infinite loop\n"
317 "Main thread consuming some CPU time...\n"
318 "Process total CPU time: 1.368\n"
319 "Main thread CPU time: 0.376\n"
320 "Subthread CPU time: 0.992\n"
321 msgstr ""
322 "$B< ./a.out>;\n"
323 "Firul principal dormind\n"
324 "Subfirul începe o buclă infinită\n"
325 "Firul principal consumând ceva timp de CPU...\n"
326 "Timpul total de procesare al procesorului: 1.368\n"
327 "Timpul CPU al firului principal: 0.376\n"
328 "Timpul CPU al subfirului: 0.992\n"
329
330 #. type: SS
331 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
332 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
333 #, no-wrap
334 msgid "Program source"
335 msgstr "Sursa programului"
336
337 #. type: Plain text
338 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
339 #: opensuse-tumbleweed
340 #, no-wrap
341 msgid ""
342 "/* Link with \"-lrt\" */\n"
343 "\\&\n"
344 "#include E<lt>err.hE<gt>\n"
345 "#include E<lt>errno.hE<gt>\n"
346 "#include E<lt>pthread.hE<gt>\n"
347 "#include E<lt>stdint.hE<gt>\n"
348 "#include E<lt>stdio.hE<gt>\n"
349 "#include E<lt>stdlib.hE<gt>\n"
350 "#include E<lt>string.hE<gt>\n"
351 "#include E<lt>sys/time.hE<gt>\n"
352 "#include E<lt>time.hE<gt>\n"
353 "#include E<lt>unistd.hE<gt>\n"
354 "\\&\n"
355 "static void *\n"
356 "thread_start(void *arg)\n"
357 "{\n"
358 " printf(\"Subthread starting infinite loop\\[rs]n\");\n"
359 " for (;;)\n"
360 " continue;\n"
361 "}\n"
362 "\\&\n"
363 "static void\n"
364 "pclock(char *msg, clockid_t cid)\n"
365 "{\n"
366 " struct timespec ts;\n"
367 "\\&\n"
368 " printf(\"%s\", msg);\n"
369 " if (clock_gettime(cid, &ts) == -1)\n"
370 " err(EXIT_FAILURE, \"clock_gettime\");\n"
371 " printf(\"%4jd.%03ld\\[rs]n\", (intmax_t) ts.tv_sec, ts.tv_nsec / 1000000);\n"
372 "}\n"
373 "\\&\n"
374 "int\n"
375 "main(void)\n"
376 "{\n"
377 " pthread_t thread;\n"
378 " clockid_t cid;\n"
379 " int s;\n"
380 "\\&\n"
381 " s = pthread_create(&thread, NULL, thread_start, NULL);\n"
382 " if (s != 0)\n"
383 " errc(EXIT_FAILURE, s, \"pthread_create\");\n"
384 "\\&\n"
385 " printf(\"Main thread sleeping\\[rs]n\");\n"
386 " sleep(1);\n"
387 "\\&\n"
388 " printf(\"Main thread consuming some CPU time...\\[rs]n\");\n"
389 " for (unsigned int j = 0; j E<lt> 2000000; j++)\n"
390 " getppid();\n"
391 "\\&\n"
392 " pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
393 "\\&\n"
394 " s = pthread_getcpuclockid(pthread_self(), &cid);\n"
395 " if (s != 0)\n"
396 " errc(EXIT_FAILURE, s, \"pthread_getcpuclockid\");\n"
397 " pclock(\"Main thread CPU time: \", cid);\n"
398 "\\&\n"
399 " /* The preceding 4 lines of code could have been replaced by:\n"
400 " pclock(\"Main thread CPU time: \", CLOCK_THREAD_CPUTIME_ID); */\n"
401 "\\&\n"
402 " s = pthread_getcpuclockid(thread, &cid);\n"
403 " if (s != 0)\n"
404 " errc(EXIT_FAILURE, s, \"pthread_getcpuclockid\");\n"
405 " pclock(\"Subthread CPU time: 1 \", cid);\n"
406 "\\&\n"
407 " exit(EXIT_SUCCESS); /* Terminates both threads */\n"
408 "}\n"
409 msgstr ""
410 "/* Editare legături cu „-lrt” */\n"
411 "\\&\n"
412 "#include E<lt>err.hE<gt>\n"
413 "#include E<lt>errno.hE<gt>\n"
414 "#include E<lt>pthread.hE<gt>\n"
415 "#include E<lt>stdint.hE<gt>\n"
416 "#include E<lt>stdio.hE<gt>\n"
417 "#include E<lt>stdlib.hE<gt>\n"
418 "#include E<lt>string.hE<gt>\n"
419 "#include E<lt>sys/time.hE<gt>\n"
420 "#include E<lt>time.hE<gt>\n"
421 "#include E<lt>unistd.hE<gt>\n"
422 "\\&\n"
423 "static void *\n"
424 "thread_start(void *arg)\n"
425 "{\n"
426 " printf(\"Subfirul începe o buclă infinită\\[rs]n\");\n"
427 " for (;;)\n"
428 " continue;\n"
429 "}\n"
430 "\\&\n"
431 "static void\n"
432 "pclock(char *msg, clockid_t cid)\n"
433 "{\n"
434 " struct timespec ts;\n"
435 "\\&\n"
436 " printf(\"%s\", msg);\n"
437 " if (clock_gettime(cid, &ts) == -1)\n"
438 " err(EXIT_FAILURE, \"clock_gettime\");\n"
439 " printf(\"%4jd.%03ld\\[rs]n\", (intmax_t) ts.tv_sec, ts.tv_nsec / 1000000);\n"
440 "}\n"
441 "\\&\n"
442 "int\n"
443 "main(void)\n"
444 "{\n"
445 " pthread_t thread;\n"
446 " clockid_t cid;\n"
447 " int s;\n"
448 "\\&\n"
449 " s = pthread_create(&thread, NULL, thread_start, NULL);\n"
450 " if (s != 0)\n"
451 " err(EXIT_FAILURE, s, \"pthread_create\");\n"
452 "\\&\n"
453 " printf(\"Firul principal dormind\\[rs]n\");\n"
454 " sleep(1);\n"
455 "\\&\n"
456 " printf(\"Firul principal consumând ceva timp de CPU...\\[rs]n\");\n"
457 " for (unsigned int j = 0; j E<lt> 2000000; j++)\n"
458 " getppid();\n"
459 "\\&\n"
460 " pclock(\"Timpul total de procesare al procesorului: \", CLOCK_PROCESS_CPUTIME_ID);\n"
461 "\\&\n"
462 " s = pthread_getcpuclockid(pthread_self(), &cid);\n"
463 " if (s != 0)\n"
464 " err(EXIT_FAILURE, s, \"pthread_getcpuclockid\");\n"
465 " pclock(\"Timpul CPU al firului principal: \", cid);\n"
466 "\\&\n"
467 " /* The preceding 4 lines of code could have been replaced by:\n"
468 " pclock(\"Timpul CPU al firului principal: \", CLOCK_THREAD_CPUTIME_ID); */\n"
469 "\\&\n"
470 " s = pthread_getcpuclockid(thread, &cid);\n"
471 " if (s != 0)\n"
472 " err(EXIT_FAILURE, s, \"pthread_getcpuclockid\");\n"
473 " pclock(\"Timpul CPU al subfirului: 1 \", cid);\n"
474 "\\&\n"
475 " exit(EXIT_SUCCESS); /* Termină ambele fire */\n"
476 "}\n"
477
478 #. SRC END
479 #. type: SH
480 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
481 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
482 #, no-wrap
483 msgid "SEE ALSO"
484 msgstr "CONSULTAȚI ȘI"
485
486 #. type: Plain text
487 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
488 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
489 msgid ""
490 "B<clock_gettime>(2), B<clock_settime>(2), B<timer_create>(2), "
491 "B<clock_getcpuclockid>(3), B<pthread_self>(3), B<pthreads>(7), B<time>(7)"
492 msgstr ""
493 "B<clock_gettime>(2), B<clock_settime>(2), B<timer_create>(2), "
494 "B<clock_getcpuclockid>(3), B<pthread_self>(3), B<pthreads>(7), B<time>(7)"
495
496 #. type: TH
497 #: debian-trixie
498 #, no-wrap
499 msgid "2024-06-15"
500 msgstr "15 iunie 2024"
501
502 #. type: TH
503 #: debian-trixie
504 #, no-wrap
505 msgid "Linux man-pages 6.9.1"
506 msgstr "Pagini de manual de Linux 6.9.1"
507
508 #. type: Plain text
509 #: debian-trixie
510 msgid "POSIX threads library (I<libpthread>, I<-lpthread>)"
511 msgstr "Biblioteca de fire de execuție POSIX (I<libpthread>, I<-lpthread>)"
512
513 #. type: Plain text
514 #: debian-trixie fedora-44 fedora-rawhide
515 #, no-wrap
516 msgid ""
517 "$ B<./a.out>\n"
518 "Main thread sleeping\n"
519 "Subthread starting infinite loop\n"
520 "Main thread consuming some CPU time...\n"
521 "Process total CPU time: 1.368\n"
522 "Main thread CPU time: 0.376\n"
523 "Subthread CPU time: 0.992\n"
524 msgstr ""
525 "$ B<./a.out>\n"
526 "Firul principal dormind\n"
527 "Subfirul începe o buclă infinită\n"
528 "Firul principal consumând ceva timp de CPU...\n"
529 "Timpul total de procesare al procesorului: 1.368\n"
530 "Timpul CPU al firului principal: 0.376\n"
531 "Timpul CPU al subfirului: 0.992\n"
532
533 #. type: Plain text
534 #: debian-trixie
535 #, no-wrap
536 msgid ""
537 "/* Link with \"-lrt\" */\n"
538 "\\&\n"
539 "#include E<lt>errno.hE<gt>\n"
540 "#include E<lt>pthread.hE<gt>\n"
541 "#include E<lt>stdint.hE<gt>\n"
542 "#include E<lt>stdio.hE<gt>\n"
543 "#include E<lt>stdlib.hE<gt>\n"
544 "#include E<lt>string.hE<gt>\n"
545 "#include E<lt>time.hE<gt>\n"
546 "#include E<lt>unistd.hE<gt>\n"
547 "\\&\n"
548 "#define handle_error(msg) \\[rs]\n"
549 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
550 "\\&\n"
551 "#define handle_error_en(en, msg) \\[rs]\n"
552 " do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
553 "\\&\n"
554 "static void *\n"
555 "thread_start(void *arg)\n"
556 "{\n"
557 " printf(\"Subthread starting infinite loop\\[rs]n\");\n"
558 " for (;;)\n"
559 " continue;\n"
560 "}\n"
561 "\\&\n"
562 "static void\n"
563 "pclock(char *msg, clockid_t cid)\n"
564 "{\n"
565 " struct timespec ts;\n"
566 "\\&\n"
567 " printf(\"%s\", msg);\n"
568 " if (clock_gettime(cid, &ts) == -1)\n"
569 " handle_error(\"clock_gettime\");\n"
570 " printf(\"%4jd.%03ld\\[rs]n\", (intmax_t) ts.tv_sec, ts.tv_nsec / 1000000);\n"
571 "}\n"
572 "\\&\n"
573 "int\n"
574 "main(void)\n"
575 "{\n"
576 " pthread_t thread;\n"
577 " clockid_t cid;\n"
578 " int s;\n"
579 "\\&\n"
580 " s = pthread_create(&thread, NULL, thread_start, NULL);\n"
581 " if (s != 0)\n"
582 " handle_error_en(s, \"pthread_create\");\n"
583 "\\&\n"
584 " printf(\"Main thread sleeping\\[rs]n\");\n"
585 " sleep(1);\n"
586 "\\&\n"
587 " printf(\"Main thread consuming some CPU time...\\[rs]n\");\n"
588 " for (unsigned int j = 0; j E<lt> 2000000; j++)\n"
589 " getppid();\n"
590 "\\&\n"
591 " pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
592 "\\&\n"
593 " s = pthread_getcpuclockid(pthread_self(), &cid);\n"
594 " if (s != 0)\n"
595 " handle_error_en(s, \"pthread_getcpuclockid\");\n"
596 " pclock(\"Main thread CPU time: \", cid);\n"
597 "\\&\n"
598 " /* The preceding 4 lines of code could have been replaced by:\n"
599 " pclock(\"Main thread CPU time: \", CLOCK_THREAD_CPUTIME_ID); */\n"
600 "\\&\n"
601 " s = pthread_getcpuclockid(thread, &cid);\n"
602 " if (s != 0)\n"
603 " handle_error_en(s, \"pthread_getcpuclockid\");\n"
604 " pclock(\"Subthread CPU time: 1 \", cid);\n"
605 "\\&\n"
606 " exit(EXIT_SUCCESS); /* Terminates both threads */\n"
607 "}\n"
608 msgstr ""
609 "/* Editare legături cu „-lrt” */\n"
610 "\\&\n"
611 "#include E<lt>errno.hE<gt>\n"
612 "#include E<lt>pthread.hE<gt>\n"
613 "#include E<lt>stdint.hE<gt>\n"
614 "#include E<lt>stdio.hE<gt>\n"
615 "#include E<lt>stdlib.hE<gt>\n"
616 "#include E<lt>string.hE<gt>\n"
617 "#include E<lt>time.hE<gt>\n"
618 "#include E<lt>unistd.hE<gt>\n"
619 "\\&\n"
620 "#define handle_error(msg) \\[rs]\n"
621 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
622 "\\&\n"
623 "#define handle_error_en(en, msg) \\[rs]\n"
624 " do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
625 "\\&\n"
626 "static void *\n"
627 "thread_start(void *arg)\n"
628 "{\n"
629 " printf(\"Subfirul începe o buclă infinită\\[rs]n\");\n"
630 " for (;;)\n"
631 " continue;\n"
632 "}\n"
633 "\\&\n"
634 "static void\n"
635 "pclock(char *msg, clockid_t cid)\n"
636 "{\n"
637 " struct timespec ts;\n"
638 "\\&\n"
639 " printf(\"%s\", msg);\n"
640 " if (clock_gettime(cid, &ts) == -1)\n"
641 " handle_error(\"clock_gettime\");\n"
642 " printf(\"%4jd.%03ld\\[rs]n\", (intmax_t) ts.tv_sec, ts.tv_nsec / 1000000);\n"
643 "}\n"
644 "\\&\n"
645 "int\n"
646 "main(void)\n"
647 "{\n"
648 " pthread_t thread;\n"
649 " clockid_t cid;\n"
650 " int s;\n"
651 "\\&\n"
652 " s = pthread_create(&thread, NULL, thread_start, NULL);\n"
653 " if (s != 0)\n"
654 " handle_error_en(s, \"pthread_create\");\n"
655 "\\&\n"
656 " printf(\"Firul principal dormind\\[rs]n\");\n"
657 " sleep(1);\n"
658 "\\&\n"
659 " printf(\"Firul principal consumând ceva timp de CPU...\\[rs]n\");\n"
660 " for (unsigned int j = 0; j E<lt> 2000000; j++)\n"
661 " getppid();\n"
662 "\\&\n"
663 " pclock(\"Timpul total de procesare al procesorului: \", CLOCK_PROCESS_CPUTIME_ID);\n"
664 "\\&\n"
665 " s = pthread_getcpuclockid(pthread_self(), &cid);\n"
666 " if (s != 0)\n"
667 " handle_error_en(s, \"pthread_getcpuclockid\");\n"
668 " pclock(\"Timpul CPU al firului principal: \", cid);\n"
669 "\\&\n"
670 " /* The preceding 4 lines of code could have been replaced by:\n"
671 " pclock(\"Timpul CPU al firului principal: \", CLOCK_THREAD_CPUTIME_ID); */\n"
672 "\\&\n"
673 " s = pthread_getcpuclockid(thread, &cid);\n"
674 " if (s != 0)\n"
675 " handle_error_en(s, \"pthread_getcpuclockid\");\n"
676 " pclock(\"Timpul CPU al subfirului: 1 \", cid);\n"
677 "\\&\n"
678 " exit(EXIT_SUCCESS); /* Termină ambele fire */\n"
679 "}\n"
680
681 #. type: TH
682 #: fedora-44 fedora-rawhide
683 #, no-wrap
684 msgid "2024-11-03"
685 msgstr "3 noiembrie 2024"
686
687 #. type: TH
688 #: fedora-44 fedora-rawhide
689 #, no-wrap
690 msgid "Linux man-pages 6.13"
691 msgstr "Pagini de manual de Linux 6.13"
692
693 #. type: Plain text
694 #: fedora-44 fedora-rawhide
695 #, no-wrap
696 msgid ""
697 "/* Link with \"-lrt\" */\n"
698 "\\&\n"
699 "#include E<lt>errno.hE<gt>\n"
700 "#include E<lt>pthread.hE<gt>\n"
701 "#include E<lt>stdint.hE<gt>\n"
702 "#include E<lt>stdio.hE<gt>\n"
703 "#include E<lt>stdlib.hE<gt>\n"
704 "#include E<lt>string.hE<gt>\n"
705 "#include E<lt>sys/time.hE<gt>\n"
706 "#include E<lt>time.hE<gt>\n"
707 "#include E<lt>unistd.hE<gt>\n"
708 "\\&\n"
709 "#define handle_error(msg) \\[rs]\n"
710 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
711 "\\&\n"
712 "#define handle_error_en(en, msg) \\[rs]\n"
713 " do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
714 "\\&\n"
715 "static void *\n"
716 "thread_start(void *arg)\n"
717 "{\n"
718 " printf(\"Subthread starting infinite loop\\[rs]n\");\n"
719 " for (;;)\n"
720 " continue;\n"
721 "}\n"
722 "\\&\n"
723 "static void\n"
724 "pclock(char *msg, clockid_t cid)\n"
725 "{\n"
726 " struct timespec ts;\n"
727 "\\&\n"
728 " printf(\"%s\", msg);\n"
729 " if (clock_gettime(cid, &ts) == -1)\n"
730 " handle_error(\"clock_gettime\");\n"
731 " printf(\"%4jd.%03ld\\[rs]n\", (intmax_t) ts.tv_sec, ts.tv_nsec / 1000000);\n"
732 "}\n"
733 "\\&\n"
734 "int\n"
735 "main(void)\n"
736 "{\n"
737 " pthread_t thread;\n"
738 " clockid_t cid;\n"
739 " int s;\n"
740 "\\&\n"
741 " s = pthread_create(&thread, NULL, thread_start, NULL);\n"
742 " if (s != 0)\n"
743 " handle_error_en(s, \"pthread_create\");\n"
744 "\\&\n"
745 " printf(\"Main thread sleeping\\[rs]n\");\n"
746 " sleep(1);\n"
747 "\\&\n"
748 " printf(\"Main thread consuming some CPU time...\\[rs]n\");\n"
749 " for (unsigned int j = 0; j E<lt> 2000000; j++)\n"
750 " getppid();\n"
751 "\\&\n"
752 " pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
753 "\\&\n"
754 " s = pthread_getcpuclockid(pthread_self(), &cid);\n"
755 " if (s != 0)\n"
756 " handle_error_en(s, \"pthread_getcpuclockid\");\n"
757 " pclock(\"Main thread CPU time: \", cid);\n"
758 "\\&\n"
759 " /* The preceding 4 lines of code could have been replaced by:\n"
760 " pclock(\"Main thread CPU time: \", CLOCK_THREAD_CPUTIME_ID); */\n"
761 "\\&\n"
762 " s = pthread_getcpuclockid(thread, &cid);\n"
763 " if (s != 0)\n"
764 " handle_error_en(s, \"pthread_getcpuclockid\");\n"
765 " pclock(\"Subthread CPU time: 1 \", cid);\n"
766 "\\&\n"
767 " exit(EXIT_SUCCESS); /* Terminates both threads */\n"
768 "}\n"
769 msgstr ""
770 "/* Editare legături cu „-lrt” */\n"
771 "\\&\n"
772 "#include E<lt>errno.hE<gt>\n"
773 "#include E<lt>pthread.hE<gt>\n"
774 "#include E<lt>stdint.hE<gt>\n"
775 "#include E<lt>stdio.hE<gt>\n"
776 "#include E<lt>stdlib.hE<gt>\n"
777 "#include E<lt>string.hE<gt>\n"
778 "#include E<lt>sys/time.hE<gt>\n"
779 "#include E<lt>time.hE<gt>\n"
780 "#include E<lt>unistd.hE<gt>\n"
781 "\\&\n"
782 "#define handle_error(msg) \\[rs]\n"
783 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
784 "\\&\n"
785 "#define handle_error_en(en, msg) \\[rs]\n"
786 " do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
787 "\\&\n"
788 "static void *\n"
789 "thread_start(void *arg)\n"
790 "{\n"
791 " printf(\"Subfirul începe o buclă infinită\\[rs]n\");\n"
792 " for (;;)\n"
793 " continue;\n"
794 "}\n"
795 "\\&\n"
796 "static void\n"
797 "pclock(char *msg, clockid_t cid)\n"
798 "{\n"
799 " struct timespec ts;\n"
800 "\\&\n"
801 " printf(\"%s\", msg);\n"
802 " if (clock_gettime(cid, &ts) == -1)\n"
803 " handle_error(\"clock_gettime\");\n"
804 " printf(\"%4jd.%03ld\\[rs]n\", (intmax_t) ts.tv_sec, ts.tv_nsec / 1000000);\n"
805 "}\n"
806 "\\&\n"
807 "int\n"
808 "main(void)\n"
809 "{\n"
810 " pthread_t thread;\n"
811 " clockid_t cid;\n"
812 " int s;\n"
813 "\\&\n"
814 " s = pthread_create(&thread, NULL, thread_start, NULL);\n"
815 " if (s != 0)\n"
816 " handle_error_en(s, \"pthread_create\");\n"
817 "\\&\n"
818 " printf(\"Firul principal dormind\\[rs]n\");\n"
819 " sleep(1);\n"
820 "\\&\n"
821 " printf(\"Firul principal consumând ceva timp de CPU...\\[rs]n\");\n"
822 " for (unsigned int j = 0; j E<lt> 2000000; j++)\n"
823 " getppid();\n"
824 "\\&\n"
825 " pclock(\"Timpul total de procesare al procesorului: \", CLOCK_PROCESS_CPUTIME_ID);\n"
826 "\\&\n"
827 " s = pthread_getcpuclockid(pthread_self(), &cid);\n"
828 " if (s != 0)\n"
829 " handle_error_en(s, \"pthread_getcpuclockid\");\n"
830 " pclock(\"Timpul CPU al firului principal: \", cid);\n"
831 "\\&\n"
832 " /* The preceding 4 lines of code could have been replaced by:\n"
833 " pclock(\"Timpul CPU al firului principal: \", CLOCK_THREAD_CPUTIME_ID); */\n"
834 "\\&\n"
835 " s = pthread_getcpuclockid(thread, &cid);\n"
836 " if (s != 0)\n"
837 " handle_error_en(s, \"pthread_getcpuclockid\");\n"
838 " pclock(\"Timpul CPU al subfirului: 1 \", cid);\n"
839 "\\&\n"
840 " exit(EXIT_SUCCESS); /* Termină ambele fire */\n"
841 "}\n"
842
843 #. type: TH
844 #: mageia-cauldron
845 #, no-wrap
846 msgid "Linux man-pages 6.17"
847 msgstr "Pagini de manual de Linux 6.17"
848
849 #. type: TH
850 #: opensuse-leap-16-1 opensuse-tumbleweed
851 #, no-wrap
852 msgid "Linux man-pages (unreleased)"
853 msgstr "Pagini de manual Linux (nepublicate)"