Debian Codegraph @

po/ar/man3/pthread_getcpuclockid.3.po

raw
1 # Arabic translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # زايد السعيدي <[email protected]>, 2026.
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: manpages-l10n 4.30.2\n"
8 "POT-Creation-Date: 2026-06-05 06:38+0200\n"
9 "PO-Revision-Date: 2026-06-02 19:37+0400\n"
10 "Last-Translator: Zayed Al-Saidi <[email protected]>\n"
11 "Language-Team: Arabic <[email protected]>\n"
12 "Language: ar\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=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
17 "&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
18 "X-Generator: Lokalize 23.08.5\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 أغسطس 2025"
33
34 #. type: TH
35 #: archlinux debian-unstable
36 #, no-wrap
37 msgid "Linux man-pages 6.18"
38 msgstr "صفحات دليل لينكس 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 "الاسم"
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 - استرداد مُعرّف ساعة وقت وحدة المعالجة المركزية لخيط"
53
54 #. type: SH
55 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
56 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
57 #, no-wrap
58 msgid "LIBRARY"
59 msgstr "المكتبة"
60
61 #. type: Plain text
62 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
63 #: opensuse-leap-16-1 opensuse-tumbleweed
64 msgid "POSIX threads library (I<libpthread>,\\ I<-lpthread>)"
65 msgstr "مكتبة مسالك POSIX (I<libpthread>،\\ I<-lpthread>)"
66
67 #. type: SH
68 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
69 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
70 #, no-wrap
71 msgid "SYNOPSIS"
72 msgstr "موجز"
73
74 #. type: Plain text
75 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
76 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
77 #, no-wrap
78 msgid ""
79 "B<#include E<lt>pthread.hE<gt>>\n"
80 "B<#include E<lt>time.hE<gt>>\n"
81 msgstr ""
82 "B<#include E<lt>pthread.hE<gt>>\n"
83 "B<#include E<lt>time.hE<gt>>\n"
84
85 #. type: Plain text
86 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
87 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
88 #, no-wrap
89 msgid "B<int pthread_getcpuclockid(pthread_t >I<thread>B<, clockid_t *>I<clockid>B<);>\n"
90 msgstr "B<int pthread_getcpuclockid(pthread_t >I<thread>B<, clockid_t *>I<clockid>B<);>\n"
91
92 #. type: SH
93 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
94 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
95 #, no-wrap
96 msgid "DESCRIPTION"
97 msgstr "الوصف"
98
99 #. The clockid is constructed as follows:
100 #. *clockid = CLOCK_THREAD_CPUTIME_ID | (pd->tid << CLOCK_IDFIELD_SIZE)
101 #. where CLOCK_IDFIELD_SIZE is 3.
102 #. type: Plain text
103 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
104 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
105 msgid ""
106 "The B<pthread_getcpuclockid>() function obtains the ID of the CPU-time "
107 "clock of the thread whose ID is given in I<thread>, and returns it in the "
108 "location pointed to by I<clockid>."
109 msgstr ""
110 "تحصل الدالة B<pthread_getcpuclockid>() على مُعرّف ساعة وقت وحدة المعالجة "
111 "المركزية للخيط الذي يُعطى مُعرّفه في I<thread>، وتُعيده في الموقع المُشار إليه "
112 "بواسطة I<clockid>."
113
114 #. type: SH
115 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
116 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
117 #, no-wrap
118 msgid "RETURN VALUE"
119 msgstr "قيمة الإرجاع"
120
121 #. type: Plain text
122 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
123 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
124 msgid ""
125 "On success, this function returns 0; on error, it returns a nonzero error "
126 "number."
127 msgstr "عند النجاح، تعيد هذه الدالة 0؛ وعند حدوث خطأ، تعيد رقم خطأ غير صفري."
128
129 #. type: SH
130 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
131 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
132 #, no-wrap
133 msgid "ERRORS"
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<ENOENT>"
141 msgstr "B<ENOENT>"
142
143 #. CLOCK_THREAD_CPUTIME_ID not defined
144 #. Looking at nptl/pthread_getcpuclockid.c an ERANGE error would
145 #. be possible if kernel thread IDs took more than 29 bits (which
146 #. they currently cannot).
147 #. type: Plain text
148 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
149 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
150 msgid "Per-thread CPU time clocks are not supported by the system."
151 msgstr "ساعات وقت وحدة المعالجة المركزية لكل خيط غير مدعومة من النظام."
152
153 #. type: TP
154 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
155 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
156 #, no-wrap
157 msgid "B<ESRCH>"
158 msgstr "B<ESRCH>"
159
160 #. type: Plain text
161 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
162 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
163 msgid "No thread with the ID I<thread> could be found."
164 msgstr "تعذر العثور على أي خيط بالمعرف I<thread>."
165
166 #. type: SH
167 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
168 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
169 #, no-wrap
170 msgid "ATTRIBUTES"
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 "For an explanation of the terms used in this section, see B<attributes>(7)."
178 msgstr ""
179 "للاطلاع على شرح للمصطلحات المستخدمة في هذا القسم، انظر B<attributes>(7)."
180
181 #. type: tbl table
182 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
183 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
184 #, no-wrap
185 msgid "Interface"
186 msgstr "الواجهة"
187
188 #. type: tbl table
189 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
190 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
191 #, no-wrap
192 msgid "Attribute"
193 msgstr "السمة"
194
195 #. type: tbl table
196 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
197 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
198 #, no-wrap
199 msgid "Value"
200 msgstr "القيمة"
201
202 #. type: tbl table
203 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
204 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
205 #, no-wrap
206 msgid ".na\n"
207 msgstr ".na\n"
208
209 #. type: tbl table
210 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
211 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
212 #, no-wrap
213 msgid ".nh\n"
214 msgstr ".nh\n"
215
216 #. type: tbl table
217 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
218 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
219 #, no-wrap
220 msgid "B<pthread_getcpuclockid>()"
221 msgstr "B<pthread_getcpuclockid>()"
222
223 #. type: tbl table
224 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
225 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
226 #, no-wrap
227 msgid "Thread safety"
228 msgstr "سلامة الخيوط"
229
230 #. type: tbl table
231 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
232 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
233 #, no-wrap
234 msgid "MT-Safe"
235 msgstr "MT-Safe"
236
237 #. type: SH
238 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
239 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
240 #, no-wrap
241 msgid "STANDARDS"
242 msgstr "المعايير"
243
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 "POSIX.1-2008."
248 msgstr "POSIX.1-2008."
249
250 #. type: SH
251 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
252 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
253 #, no-wrap
254 msgid "HISTORY"
255 msgstr "التاريخ"
256
257 #. type: Plain text
258 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
259 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
260 msgid "glibc 2.2. POSIX.1-2001."
261 msgstr "glibc 2.2. POSIX.1-2001."
262
263 #. type: SH
264 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
265 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
266 #, no-wrap
267 msgid "NOTES"
268 msgstr "ملاحظات"
269
270 #. type: Plain text
271 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
272 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
273 msgid ""
274 "When I<thread> refers to the calling thread, this function returns an "
275 "identifier that refers to the same clock manipulated by B<clock_gettime>(2) "
276 "and B<clock_settime>(2) when given the clock ID B<CLOCK_THREAD_CPUTIME_ID>."
277 msgstr ""
278 "عندما يُشير I<thread> إلى الخيط المُستدعي، تُعيد هذه الدالة مُعرّفاً يُشير إلى نفس "
279 "الساعة التي يُعالجها B<clock_gettime>(2) و B<clock_settime>(2) عند إعطاء مُعرّف "
280 "الساعة B<CLOCK_THREAD_CPUTIME_ID>."
281
282 #. type: SH
283 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
284 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
285 #, no-wrap
286 msgid "EXAMPLES"
287 msgstr "أمثلة"
288
289 #. type: Plain text
290 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
291 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
292 msgid ""
293 "The program below creates a thread and then uses B<clock_gettime>(2) to "
294 "retrieve the total process CPU time, and the per-thread CPU time consumed by "
295 "the two threads. The following shell session shows an example run:"
296 msgstr ""
297 "يُنشئ البرنامج أدناه خيطاً ثم يستخدم B<clock_gettime>(2) لاسترداد إجمالي وقت "
298 "وحدة المعالجة المركزية للعملية، ووقت وحدة المعالجة المركزية لكل خيط المُستهلك "
299 "من قبل الخيطين. تُظهر جلسة الصدفة التالية تشغيلاً مثالياً:"
300
301 #. type: Plain text
302 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
303 #: opensuse-tumbleweed
304 #, no-wrap
305 msgid ""
306 "$B< ./a.out>;\n"
307 "Main thread sleeping\n"
308 "Subthread starting infinite loop\n"
309 "Main thread consuming some CPU time...\n"
310 "Process total CPU time: 1.368\n"
311 "Main thread CPU time: 0.376\n"
312 "Subthread CPU time: 0.992\n"
313 msgstr ""
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
322 #. type: SS
323 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
324 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
325 #, no-wrap
326 msgid "Program source"
327 msgstr "مصدر البرنامج"
328
329 #. type: Plain text
330 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
331 #: opensuse-tumbleweed
332 #, no-wrap
333 msgid ""
334 "/* Link with \"-lrt\" */\n"
335 "\\&\n"
336 "#include E<lt>err.hE<gt>\n"
337 "#include E<lt>errno.hE<gt>\n"
338 "#include E<lt>pthread.hE<gt>\n"
339 "#include E<lt>stdint.hE<gt>\n"
340 "#include E<lt>stdio.hE<gt>\n"
341 "#include E<lt>stdlib.hE<gt>\n"
342 "#include E<lt>string.hE<gt>\n"
343 "#include E<lt>sys/time.hE<gt>\n"
344 "#include E<lt>time.hE<gt>\n"
345 "#include E<lt>unistd.hE<gt>\n"
346 "\\&\n"
347 "static void *\n"
348 "thread_start(void *arg)\n"
349 "{\n"
350 " printf(\"Subthread starting infinite loop\\[rs]n\");\n"
351 " for (;;)\n"
352 " continue;\n"
353 "}\n"
354 "\\&\n"
355 "static void\n"
356 "pclock(char *msg, clockid_t cid)\n"
357 "{\n"
358 " struct timespec ts;\n"
359 "\\&\n"
360 " printf(\"%s\", msg);\n"
361 " if (clock_gettime(cid, &ts) == -1)\n"
362 " err(EXIT_FAILURE, \"clock_gettime\");\n"
363 " printf(\"%4jd.%03ld\\[rs]n\", (intmax_t) ts.tv_sec, ts.tv_nsec / 1000000);\n"
364 "}\n"
365 "\\&\n"
366 "int\n"
367 "main(void)\n"
368 "{\n"
369 " pthread_t thread;\n"
370 " clockid_t cid;\n"
371 " int s;\n"
372 "\\&\n"
373 " s = pthread_create(&thread, NULL, thread_start, NULL);\n"
374 " if (s != 0)\n"
375 " errc(EXIT_FAILURE, s, \"pthread_create\");\n"
376 "\\&\n"
377 " printf(\"Main thread sleeping\\[rs]n\");\n"
378 " sleep(1);\n"
379 "\\&\n"
380 " printf(\"Main thread consuming some CPU time...\\[rs]n\");\n"
381 " for (unsigned int j = 0; j E<lt> 2000000; j++)\n"
382 " getppid();\n"
383 "\\&\n"
384 " pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
385 "\\&\n"
386 " s = pthread_getcpuclockid(pthread_self(), &cid);\n"
387 " if (s != 0)\n"
388 " errc(EXIT_FAILURE, s, \"pthread_getcpuclockid\");\n"
389 " pclock(\"Main thread CPU time: \", cid);\n"
390 "\\&\n"
391 " /* The preceding 4 lines of code could have been replaced by:\n"
392 " pclock(\"Main thread CPU time: \", CLOCK_THREAD_CPUTIME_ID); */\n"
393 "\\&\n"
394 " s = pthread_getcpuclockid(thread, &cid);\n"
395 " if (s != 0)\n"
396 " errc(EXIT_FAILURE, s, \"pthread_getcpuclockid\");\n"
397 " pclock(\"Subthread CPU time: 1 \", cid);\n"
398 "\\&\n"
399 " exit(EXIT_SUCCESS); /* Terminates both threads */\n"
400 "}\n"
401 msgstr ""
402 "/* Link with \"-lrt\" */\n"
403 "\\&\n"
404 "#include E<lt>err.hE<gt>\n"
405 "#include E<lt>errno.hE<gt>\n"
406 "#include E<lt>pthread.hE<gt>\n"
407 "#include E<lt>stdint.hE<gt>\n"
408 "#include E<lt>stdio.hE<gt>\n"
409 "#include E<lt>stdlib.hE<gt>\n"
410 "#include E<lt>string.hE<gt>\n"
411 "#include E<lt>sys/time.hE<gt>\n"
412 "#include E<lt>time.hE<gt>\n"
413 "#include E<lt>unistd.hE<gt>\n"
414 "\\&\n"
415 "static void *\n"
416 "thread_start(void *arg)\n"
417 "{\n"
418 " printf(\"Subthread starting infinite loop\\[rs]n\");\n"
419 " for (;;)\n"
420 " continue;\n"
421 "}\n"
422 "\\&\n"
423 "static void\n"
424 "pclock(char *msg, clockid_t cid)\n"
425 "{\n"
426 " struct timespec ts;\n"
427 "\\&\n"
428 " printf(\"%s\", msg);\n"
429 " if (clock_gettime(cid, &ts) == -1)\n"
430 " err(EXIT_FAILURE, \"clock_gettime\");\n"
431 " printf(\"%4jd.%03ld\\[rs]n\", (intmax_t) ts.tv_sec, ts.tv_nsec / 1000000);\n"
432 "}\n"
433 "\\&\n"
434 "int\n"
435 "main(void)\n"
436 "{\n"
437 " pthread_t thread;\n"
438 " clockid_t cid;\n"
439 " int s;\n"
440 "\\&\n"
441 " s = pthread_create(&thread, NULL, thread_start, NULL);\n"
442 " if (s != 0)\n"
443 " errc(EXIT_FAILURE, s, \"pthread_create\");\n"
444 "\\&\n"
445 " printf(\"Main thread sleeping\\[rs]n\");\n"
446 " sleep(1);\n"
447 "\\&\n"
448 " printf(\"Main thread consuming some CPU time...\\[rs]n\");\n"
449 " for (unsigned int j = 0; j E<lt> 2000000; j++)\n"
450 " getppid();\n"
451 "\\&\n"
452 " pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
453 "\\&\n"
454 " s = pthread_getcpuclockid(pthread_self(), &cid);\n"
455 " if (s != 0)\n"
456 " errc(EXIT_FAILURE, s, \"pthread_getcpuclockid\");\n"
457 " pclock(\"Main thread CPU time: \", cid);\n"
458 "\\&\n"
459 " /* The preceding 4 lines of code could have been replaced by:\n"
460 " pclock(\"Main thread CPU time: \", CLOCK_THREAD_CPUTIME_ID); */\n"
461 "\\&\n"
462 " s = pthread_getcpuclockid(thread, &cid);\n"
463 " if (s != 0)\n"
464 " errc(EXIT_FAILURE, s, \"pthread_getcpuclockid\");\n"
465 " pclock(\"Subthread CPU time: 1 \", cid);\n"
466 "\\&\n"
467 " exit(EXIT_SUCCESS); /* Terminates both threads */\n"
468 "}\n"
469
470 #. SRC END
471 #. type: SH
472 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
473 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
474 #, no-wrap
475 msgid "SEE ALSO"
476 msgstr "انظر أيضًا"
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 "B<clock_gettime>(2), B<clock_settime>(2), B<timer_create>(2), "
483 "B<clock_getcpuclockid>(3), B<pthread_self>(3), B<pthreads>(7), B<time>(7)"
484 msgstr ""
485 "B<clock_gettime>(2), B<clock_settime>(2), B<timer_create>(2), "
486 "B<clock_getcpuclockid>(3), B<pthread_self>(3), B<pthreads>(7), B<time>(7)"
487
488 #. type: TH
489 #: debian-trixie
490 #, no-wrap
491 msgid "2024-06-15"
492 msgstr "15 يونيو 2024"
493
494 #. type: TH
495 #: debian-trixie
496 #, no-wrap
497 msgid "Linux man-pages 6.9.1"
498 msgstr "صفحات دليل لينكس 6.9.1"
499
500 #. type: Plain text
501 #: debian-trixie
502 msgid "POSIX threads library (I<libpthread>, I<-lpthread>)"
503 msgstr "مكتبة مسالك POSIX (I<libpthread>، I<-lpthread>)"
504
505 #. type: Plain text
506 #: debian-trixie fedora-44 fedora-rawhide
507 #, no-wrap
508 msgid ""
509 "$ B<./a.out>\n"
510 "Main thread sleeping\n"
511 "Subthread starting infinite loop\n"
512 "Main thread consuming some CPU time...\n"
513 "Process total CPU time: 1.368\n"
514 "Main thread CPU time: 0.376\n"
515 "Subthread CPU time: 0.992\n"
516 msgstr ""
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
525 #. type: Plain text
526 #: debian-trixie
527 #, no-wrap
528 msgid ""
529 "/* Link with \"-lrt\" */\n"
530 "\\&\n"
531 "#include E<lt>errno.hE<gt>\n"
532 "#include E<lt>pthread.hE<gt>\n"
533 "#include E<lt>stdint.hE<gt>\n"
534 "#include E<lt>stdio.hE<gt>\n"
535 "#include E<lt>stdlib.hE<gt>\n"
536 "#include E<lt>string.hE<gt>\n"
537 "#include E<lt>time.hE<gt>\n"
538 "#include E<lt>unistd.hE<gt>\n"
539 "\\&\n"
540 "#define handle_error(msg) \\[rs]\n"
541 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
542 "\\&\n"
543 "#define handle_error_en(en, msg) \\[rs]\n"
544 " do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
545 "\\&\n"
546 "static void *\n"
547 "thread_start(void *arg)\n"
548 "{\n"
549 " printf(\"Subthread starting infinite loop\\[rs]n\");\n"
550 " for (;;)\n"
551 " continue;\n"
552 "}\n"
553 "\\&\n"
554 "static void\n"
555 "pclock(char *msg, clockid_t cid)\n"
556 "{\n"
557 " struct timespec ts;\n"
558 "\\&\n"
559 " printf(\"%s\", msg);\n"
560 " if (clock_gettime(cid, &ts) == -1)\n"
561 " handle_error(\"clock_gettime\");\n"
562 " printf(\"%4jd.%03ld\\[rs]n\", (intmax_t) ts.tv_sec, ts.tv_nsec / 1000000);\n"
563 "}\n"
564 "\\&\n"
565 "int\n"
566 "main(void)\n"
567 "{\n"
568 " pthread_t thread;\n"
569 " clockid_t cid;\n"
570 " int s;\n"
571 "\\&\n"
572 " s = pthread_create(&thread, NULL, thread_start, NULL);\n"
573 " if (s != 0)\n"
574 " handle_error_en(s, \"pthread_create\");\n"
575 "\\&\n"
576 " printf(\"Main thread sleeping\\[rs]n\");\n"
577 " sleep(1);\n"
578 "\\&\n"
579 " printf(\"Main thread consuming some CPU time...\\[rs]n\");\n"
580 " for (unsigned int j = 0; j E<lt> 2000000; j++)\n"
581 " getppid();\n"
582 "\\&\n"
583 " pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
584 "\\&\n"
585 " s = pthread_getcpuclockid(pthread_self(), &cid);\n"
586 " if (s != 0)\n"
587 " handle_error_en(s, \"pthread_getcpuclockid\");\n"
588 " pclock(\"Main thread CPU time: \", cid);\n"
589 "\\&\n"
590 " /* The preceding 4 lines of code could have been replaced by:\n"
591 " pclock(\"Main thread CPU time: \", CLOCK_THREAD_CPUTIME_ID); */\n"
592 "\\&\n"
593 " s = pthread_getcpuclockid(thread, &cid);\n"
594 " if (s != 0)\n"
595 " handle_error_en(s, \"pthread_getcpuclockid\");\n"
596 " pclock(\"Subthread CPU time: 1 \", cid);\n"
597 "\\&\n"
598 " exit(EXIT_SUCCESS); /* Terminates both threads */\n"
599 "}\n"
600 msgstr ""
601 "/* Link with \"-lrt\" */\n"
602 "\\&\n"
603 "#include E<lt>errno.hE<gt>\n"
604 "#include E<lt>pthread.hE<gt>\n"
605 "#include E<lt>stdint.hE<gt>\n"
606 "#include E<lt>stdio.hE<gt>\n"
607 "#include E<lt>stdlib.hE<gt>\n"
608 "#include E<lt>string.hE<gt>\n"
609 "#include E<lt>time.hE<gt>\n"
610 "#include E<lt>unistd.hE<gt>\n"
611 "\\&\n"
612 "#define handle_error(msg) \\[rs]\n"
613 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
614 "\\&\n"
615 "#define handle_error_en(en, msg) \\[rs]\n"
616 " do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
617 "\\&\n"
618 "static void *\n"
619 "thread_start(void *arg)\n"
620 "{\n"
621 " printf(\"Subthread starting infinite loop\\[rs]n\");\n"
622 " for (;;)\n"
623 " continue;\n"
624 "}\n"
625 "\\&\n"
626 "static void\n"
627 "pclock(char *msg, clockid_t cid)\n"
628 "{\n"
629 " struct timespec ts;\n"
630 "\\&\n"
631 " printf(\"%s\", msg);\n"
632 " if (clock_gettime(cid, &ts) == -1)\n"
633 " handle_error(\"clock_gettime\");\n"
634 " printf(\"%4jd.%03ld\\[rs]n\", (intmax_t) ts.tv_sec, ts.tv_nsec / 1000000);\n"
635 "}\n"
636 "\\&\n"
637 "int\n"
638 "main(void)\n"
639 "{\n"
640 " pthread_t thread;\n"
641 " clockid_t cid;\n"
642 " int s;\n"
643 "\\&\n"
644 " s = pthread_create(&thread, NULL, thread_start, NULL);\n"
645 " if (s != 0)\n"
646 " handle_error_en(s, \"pthread_create\");\n"
647 "\\&\n"
648 " printf(\"Main thread sleeping\\[rs]n\");\n"
649 " sleep(1);\n"
650 "\\&\n"
651 " printf(\"Main thread consuming some CPU time...\\[rs]n\");\n"
652 " for (unsigned int j = 0; j E<lt> 2000000; j++)\n"
653 " getppid();\n"
654 "\\&\n"
655 " pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
656 "\\&\n"
657 " s = pthread_getcpuclockid(pthread_self(), &cid);\n"
658 " if (s != 0)\n"
659 " handle_error_en(s, \"pthread_getcpuclockid\");\n"
660 " pclock(\"Main thread CPU time: \", cid);\n"
661 "\\&\n"
662 " /* The preceding 4 lines of code could have been replaced by:\n"
663 " pclock(\"Main thread CPU time: \", CLOCK_THREAD_CPUTIME_ID); */\n"
664 "\\&\n"
665 " s = pthread_getcpuclockid(thread, &cid);\n"
666 " if (s != 0)\n"
667 " handle_error_en(s, \"pthread_getcpuclockid\");\n"
668 " pclock(\"Subthread CPU time: 1 \", cid);\n"
669 "\\&\n"
670 " exit(EXIT_SUCCESS); /* Terminates both threads */\n"
671 "}\n"
672
673 #. type: TH
674 #: fedora-44 fedora-rawhide
675 #, no-wrap
676 msgid "2024-11-03"
677 msgstr "3 نوفمبر 2024"
678
679 #. type: TH
680 #: fedora-44 fedora-rawhide
681 #, no-wrap
682 msgid "Linux man-pages 6.13"
683 msgstr "صفحات دليل لينكس 6.13"
684
685 #. type: Plain text
686 #: fedora-44 fedora-rawhide
687 #, no-wrap
688 msgid ""
689 "/* Link with \"-lrt\" */\n"
690 "\\&\n"
691 "#include E<lt>errno.hE<gt>\n"
692 "#include E<lt>pthread.hE<gt>\n"
693 "#include E<lt>stdint.hE<gt>\n"
694 "#include E<lt>stdio.hE<gt>\n"
695 "#include E<lt>stdlib.hE<gt>\n"
696 "#include E<lt>string.hE<gt>\n"
697 "#include E<lt>sys/time.hE<gt>\n"
698 "#include E<lt>time.hE<gt>\n"
699 "#include E<lt>unistd.hE<gt>\n"
700 "\\&\n"
701 "#define handle_error(msg) \\[rs]\n"
702 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
703 "\\&\n"
704 "#define handle_error_en(en, msg) \\[rs]\n"
705 " do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
706 "\\&\n"
707 "static void *\n"
708 "thread_start(void *arg)\n"
709 "{\n"
710 " printf(\"Subthread starting infinite loop\\[rs]n\");\n"
711 " for (;;)\n"
712 " continue;\n"
713 "}\n"
714 "\\&\n"
715 "static void\n"
716 "pclock(char *msg, clockid_t cid)\n"
717 "{\n"
718 " struct timespec ts;\n"
719 "\\&\n"
720 " printf(\"%s\", msg);\n"
721 " if (clock_gettime(cid, &ts) == -1)\n"
722 " handle_error(\"clock_gettime\");\n"
723 " printf(\"%4jd.%03ld\\[rs]n\", (intmax_t) ts.tv_sec, ts.tv_nsec / 1000000);\n"
724 "}\n"
725 "\\&\n"
726 "int\n"
727 "main(void)\n"
728 "{\n"
729 " pthread_t thread;\n"
730 " clockid_t cid;\n"
731 " int s;\n"
732 "\\&\n"
733 " s = pthread_create(&thread, NULL, thread_start, NULL);\n"
734 " if (s != 0)\n"
735 " handle_error_en(s, \"pthread_create\");\n"
736 "\\&\n"
737 " printf(\"Main thread sleeping\\[rs]n\");\n"
738 " sleep(1);\n"
739 "\\&\n"
740 " printf(\"Main thread consuming some CPU time...\\[rs]n\");\n"
741 " for (unsigned int j = 0; j E<lt> 2000000; j++)\n"
742 " getppid();\n"
743 "\\&\n"
744 " pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
745 "\\&\n"
746 " s = pthread_getcpuclockid(pthread_self(), &cid);\n"
747 " if (s != 0)\n"
748 " handle_error_en(s, \"pthread_getcpuclockid\");\n"
749 " pclock(\"Main thread CPU time: \", cid);\n"
750 "\\&\n"
751 " /* The preceding 4 lines of code could have been replaced by:\n"
752 " pclock(\"Main thread CPU time: \", CLOCK_THREAD_CPUTIME_ID); */\n"
753 "\\&\n"
754 " s = pthread_getcpuclockid(thread, &cid);\n"
755 " if (s != 0)\n"
756 " handle_error_en(s, \"pthread_getcpuclockid\");\n"
757 " pclock(\"Subthread CPU time: 1 \", cid);\n"
758 "\\&\n"
759 " exit(EXIT_SUCCESS); /* Terminates both threads */\n"
760 "}\n"
761 msgstr ""
762 "/* Link with \"-lrt\" */\n"
763 "\\&\n"
764 "#include E<lt>errno.hE<gt>\n"
765 "#include E<lt>pthread.hE<gt>\n"
766 "#include E<lt>stdint.hE<gt>\n"
767 "#include E<lt>stdio.hE<gt>\n"
768 "#include E<lt>stdlib.hE<gt>\n"
769 "#include E<lt>string.hE<gt>\n"
770 "#include E<lt>sys/time.hE<gt>\n"
771 "#include E<lt>time.hE<gt>\n"
772 "#include E<lt>unistd.hE<gt>\n"
773 "\\&\n"
774 "#define handle_error(msg) \\[rs]\n"
775 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
776 "\\&\n"
777 "#define handle_error_en(en, msg) \\[rs]\n"
778 " do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
779 "\\&\n"
780 "static void *\n"
781 "thread_start(void *arg)\n"
782 "{\n"
783 " printf(\"Subthread starting infinite loop\\[rs]n\");\n"
784 " for (;;)\n"
785 " continue;\n"
786 "}\n"
787 "\\&\n"
788 "static void\n"
789 "pclock(char *msg, clockid_t cid)\n"
790 "{\n"
791 " struct timespec ts;\n"
792 "\\&\n"
793 " printf(\"%s\", msg);\n"
794 " if (clock_gettime(cid, &ts) == -1)\n"
795 " handle_error(\"clock_gettime\");\n"
796 " printf(\"%4jd.%03ld\\[rs]n\", (intmax_t) ts.tv_sec, ts.tv_nsec / 1000000);\n"
797 "}\n"
798 "\\&\n"
799 "int\n"
800 "main(void)\n"
801 "{\n"
802 " pthread_t thread;\n"
803 " clockid_t cid;\n"
804 " int s;\n"
805 "\\&\n"
806 " s = pthread_create(&thread, NULL, thread_start, NULL);\n"
807 " if (s != 0)\n"
808 " handle_error_en(s, \"pthread_create\");\n"
809 "\\&\n"
810 " printf(\"Main thread sleeping\\[rs]n\");\n"
811 " sleep(1);\n"
812 "\\&\n"
813 " printf(\"Main thread consuming some CPU time...\\[rs]n\");\n"
814 " for (unsigned int j = 0; j E<lt> 2000000; j++)\n"
815 " getppid();\n"
816 "\\&\n"
817 " pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
818 "\\&\n"
819 " s = pthread_getcpuclockid(pthread_self(), &cid);\n"
820 " if (s != 0)\n"
821 " handle_error_en(s, \"pthread_getcpuclockid\");\n"
822 " pclock(\"Main thread CPU time: \", cid);\n"
823 "\\&\n"
824 " /* The preceding 4 lines of code could have been replaced by:\n"
825 " pclock(\"Main thread CPU time: \", CLOCK_THREAD_CPUTIME_ID); */\n"
826 "\\&\n"
827 " s = pthread_getcpuclockid(thread, &cid);\n"
828 " if (s != 0)\n"
829 " handle_error_en(s, \"pthread_getcpuclockid\");\n"
830 " pclock(\"Subthread CPU time: 1 \", cid);\n"
831 "\\&\n"
832 " exit(EXIT_SUCCESS); /* Terminates both threads */\n"
833 "}\n"
834
835 #. type: TH
836 #: mageia-cauldron
837 #, no-wrap
838 msgid "Linux man-pages 6.17"
839 msgstr "صفحات دليل لينكس 6.17"
840
841 #. type: TH
842 #: opensuse-leap-16-1 opensuse-tumbleweed
843 #, no-wrap
844 msgid "Linux man-pages (unreleased)"
845 msgstr "صفحات دليل لينكس (لم تصدر بعد)"