Debian Codegraph @

po/ar/man7/aio.7.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:17+0200\n"
9 "PO-Revision-Date: 2026-05-12 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 "AIO"
25 msgstr "AIO"
26
27 #. type: TH
28 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
29 #: opensuse-tumbleweed
30 #, no-wrap
31 msgid "2026-02-08"
32 msgstr "8 فبراير 2026"
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 "aio - POSIX asynchronous I/O overview"
51 msgstr "aio - نظرة عامة على الإدخال/الإخراج غير المتزامن وفق معيار POSIX"
52
53 #. type: SH
54 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
55 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
56 #, no-wrap
57 msgid "DESCRIPTION"
58 msgstr "الوصف"
59
60 #. type: Plain text
61 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
62 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
63 msgid ""
64 "The POSIX asynchronous I/O (AIO) interface allows applications to initiate "
65 "one or more I/O operations that are performed asynchronously (i.e., in the "
66 "background). The application can elect to be notified of completion of the "
67 "I/O operation in a variety of ways: by delivery of a signal, by "
68 "instantiation of a thread, or no notification at all."
69 msgstr ""
70 "واجهة الإدخال/الإخراج غير المتزامن (AIO) وفق معيار POSIX تسمح للتطبيقات ببدء "
71 "عملية إدخال/إخراج واحدة أو أكثر تُنفذ بشكل غير متزامن (أي في الخلفية). يمكن "
72 "للتطبيق اختيار الإشعار بإتمام عملية الإدخال/الإخراج بطرق متنوعة: عبر تسليم "
73 "إشارة، أو عبر إنشاء خيط، أو بدون أي إشعار على الإطلاق."
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 msgid "The POSIX AIO interface consists of the following functions:"
79 msgstr "تتكون واجهة POSIX AIO من الدوال التالية:"
80
81 #. type: TP
82 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
83 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
84 #, no-wrap
85 msgid "B<aio_read>(3)"
86 msgstr "B<aio_read>(3)"
87
88 #. type: Plain text
89 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
90 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
91 msgid "Enqueue a read request. This is the asynchronous analog of B<read>(2)."
92 msgstr ""
93 "إدراج طلب قراءة في قائمة الانتظار. هذا هو النظير غير المتزامن لـ B<read>(2)."
94
95 #. type: TP
96 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
97 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
98 #, no-wrap
99 msgid "B<aio_write>(3)"
100 msgstr "B<aio_write>(3)"
101
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 "Enqueue a write request. This is the asynchronous analog of B<write>(2)."
107 msgstr ""
108 "إدراج طلب كتابة في قائمة الانتظار. هذا هو النظير غير المتزامن لـ B<write>(2)."
109
110 #. type: TP
111 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
112 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
113 #, no-wrap
114 msgid "B<aio_fsync>(3)"
115 msgstr "B<aio_fsync>(3)"
116
117 #. type: Plain text
118 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
119 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
120 msgid ""
121 "Enqueue a sync request for the I/O operations on a file descriptor. This is "
122 "the asynchronous analog of B<fsync>(2) and B<fdatasync>(2)."
123 msgstr ""
124 "إدراج طلب مزامنة لعمليات الإدخال/الإخراج على واصف ملف. هذا هو النظير غير "
125 "المتزامن لـ B<fsync>(2) و B<fdatasync>(2)."
126
127 #. type: TP
128 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
129 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
130 #, no-wrap
131 msgid "B<aio_error>(3)"
132 msgstr "B<aio_error>(3)"
133
134 #. type: Plain text
135 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
136 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
137 msgid "Obtain the error status of an enqueued I/O request."
138 msgstr "الحصول على حالة الخطأ لطلب إدخال/إخراج مُدرج في قائمة الانتظار."
139
140 #. type: TP
141 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
142 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
143 #, no-wrap
144 msgid "B<aio_return>(3)"
145 msgstr "B<aio_return>(3)"
146
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 "Obtain the return status of a completed I/O request."
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<aio_suspend>(3)"
158 msgstr "B<aio_suspend>(3)"
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 ""
164 "Suspend the caller until one or more of a specified set of I/O requests "
165 "completes."
166 msgstr ""
167 "تعليق المستدعي حتى اكتمال طلب إدخال/إخراج واحد أو أكثر من مجموعة محددة."
168
169 #. type: TP
170 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
171 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
172 #, no-wrap
173 msgid "B<aio_cancel>(3)"
174 msgstr "B<aio_cancel>(3)"
175
176 #. type: Plain text
177 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
178 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
179 msgid ""
180 "Attempt to cancel outstanding I/O requests on a specified file descriptor."
181 msgstr "محاولة إلغاء طلبات الإدخال/الإخراج المعلقة على واصف ملف محدد."
182
183 #. type: TP
184 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
185 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
186 #, no-wrap
187 msgid "B<lio_listio>(3)"
188 msgstr "B<lio_listio>(3)"
189
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 "Enqueue multiple I/O requests using a single function call."
194 msgstr ""
195 "إدراج طلبات إدخال/إخراج متعددة في قائمة الانتظار باستخدام استدعاء دالة واحد."
196
197 #. type: Plain text
198 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
199 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
200 msgid ""
201 "The I<aiocb> (\"asynchronous I/O control block\") structure defines "
202 "parameters that control an I/O operation. An argument of this type is "
203 "employed with all of the functions listed above. This structure has the "
204 "following form:"
205 msgstr ""
206 "هيكل I<aiocb> (\"كتلة التحكم في الإدخال/الإخراج غير المتزامن\") يُعرّف "
207 "المعاملات التي تتحكم في عملية إدخال/إخراج. يُستخدم وسيط من هذا النوع مع جميع "
208 "الدوال المذكورة أعلاه. هذا الهيكل له الشكل التالي:"
209
210 #. type: Plain text
211 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
212 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
213 #, no-wrap
214 msgid ""
215 "#include E<lt>aiocb.hE<gt>\n"
216 "\\&\n"
217 "struct aiocb {\n"
218 " /* The order of these fields is implementation-dependent */\n"
219 "\\&\n"
220 " int aio_fildes; /* File descriptor */\n"
221 " off_t aio_offset; /* File offset */\n"
222 " volatile void *aio_buf; /* Location of buffer */\n"
223 " size_t aio_nbytes; /* Length of transfer */\n"
224 " int aio_reqprio; /* Request priority */\n"
225 " struct sigevent aio_sigevent; /* Notification method */\n"
226 " int aio_lio_opcode; /* Operation to be performed;\n"
227 " lio_listio() only */\n"
228 "\\&\n"
229 " /* Various implementation-internal fields not shown */\n"
230 "};\n"
231 "\\&\n"
232 "/* Operation codes for \\[aq]aio_lio_opcode\\[aq]: */\n"
233 "\\&\n"
234 "enum { LIO_READ, LIO_WRITE, LIO_NOP };\n"
235 msgstr ""
236 "#include E<lt>aiocb.hE<gt>\n"
237 "\\&\n"
238 "struct aiocb {\n"
239 " /* The order of these fields is implementation-dependent */\n"
240 "\\&\n"
241 " int aio_fildes; /* File descriptor */\n"
242 " off_t aio_offset; /* File offset */\n"
243 " volatile void *aio_buf; /* Location of buffer */\n"
244 " size_t aio_nbytes; /* Length of transfer */\n"
245 " int aio_reqprio; /* Request priority */\n"
246 " struct sigevent aio_sigevent; /* Notification method */\n"
247 " int aio_lio_opcode; /* Operation to be performed;\n"
248 " lio_listio() only */\n"
249 "\\&\n"
250 " /* Various implementation-internal fields not shown */\n"
251 "};\n"
252 "\\&\n"
253 "/* Operation codes for \\[aq]aio_lio_opcode\\[aq]: */\n"
254 "\\&\n"
255 "enum { LIO_READ, LIO_WRITE, LIO_NOP };\n"
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 "The fields of this structure are as follows:"
261 msgstr "حقول هذا الهيكل هي كالتالي:"
262
263 #. type: TP
264 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
265 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
266 #, no-wrap
267 msgid "I<aio_fildes>"
268 msgstr "I<aio_fildes>"
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 "The file descriptor on which the I/O operation is to be performed."
274 msgstr "واصف الملف الذي سيجري عليه الإدخال/الإخراج."
275
276 #. type: TP
277 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
278 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
279 #, no-wrap
280 msgid "I<aio_offset>"
281 msgstr "I<aio_offset>"
282
283 #. type: Plain text
284 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
285 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
286 msgid "This is the file offset at which the I/O operation is to be performed."
287 msgstr "هذه هي إزاحة الملف التي ستُجرى عندها عملية الإدخال/الإخراج."
288
289 #. type: TP
290 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
291 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
292 #, no-wrap
293 msgid "I<aio_buf>"
294 msgstr "I<aio_buf>"
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 "This is the buffer used to transfer data for a read or write operation."
300 msgstr "هذه هي الخبيئة المستخدمة لنقل البيانات لعملية قراءة أو كتابة."
301
302 #. type: TP
303 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
304 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
305 #, no-wrap
306 msgid "I<aio_nbytes>"
307 msgstr "I<aio_nbytes>"
308
309 #. type: Plain text
310 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
311 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
312 msgid "This is the size of the buffer pointed to by I<aio_buf>."
313 msgstr "هذا هو حجم الوسيط الذي يشير إليه I<aio_buf>."
314
315 #. type: TP
316 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
317 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
318 #, no-wrap
319 msgid "I<aio_reqprio>"
320 msgstr "I<aio_reqprio>"
321
322 #. type: Plain text
323 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
324 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
325 msgid ""
326 "This field specifies a value that is subtracted from the calling thread's "
327 "real-time priority in order to determine the priority for execution of this "
328 "I/O request (see B<pthread_setschedparam>(3)). The specified value must be "
329 "between 0 and the value returned by I<sysconf(_SC_AIO_PRIO_DELTA_MAX)>. "
330 "This field is ignored for file synchronization operations."
331 msgstr ""
332 "يحدد هذا الحقل قيمة تُطرح من أولوية الوقت الفعلي للخيط المستدعي لتحديد أولوية "
333 "تنفيذ طلب الإدخال/الإخراج هذا (انظر B<pthread_setschedparam>(3)). يجب أن "
334 "تكون القيمة المحددة بين 0 والقيمة التي يُرجعها "
335 "I<sysconf(_SC_AIO_PRIO_DELTA_MAX)>. يُتجاهل هذا الحقل لعمليات مزامنة الملف."
336
337 #. type: TP
338 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
339 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
340 #, no-wrap
341 msgid "I<aio_sigevent>"
342 msgstr "I<aio_sigevent>"
343
344 #. type: Plain text
345 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
346 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
347 msgid ""
348 "This field is a structure that specifies how the caller is to be notified "
349 "when the asynchronous I/O operation completes. Possible values for "
350 "I<aio_sigevent.sigev_notify> are B<SIGEV_NONE>, B<SIGEV_SIGNAL>, and "
351 "B<SIGEV_THREAD>. See B<sigevent>(3type) for further details."
352 msgstr ""
353 "هذا الحقل هو هيكل يحدد كيفية إشعار المستدعي عند اكتمال عملية الإدخال/الإخراج "
354 "غير المتزامن. القيم الممكنة لـ I<aio_sigevent.sigev_notify> هي B<SIGEV_NONE> "
355 "و B<SIGEV_SIGNAL> و B<SIGEV_THREAD>. انظر B<sigevent>(3type) لمزيد من "
356 "التفاصيل."
357
358 #. type: TP
359 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
360 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
361 #, no-wrap
362 msgid "I<aio_lio_opcode>"
363 msgstr "I<aio_lio_opcode>"
364
365 #. type: Plain text
366 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
367 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
368 msgid "The type of operation to be performed; used only for B<lio_listio>(3)."
369 msgstr "نوع العملية المراد تنفيذها؛ يُستخدم فقط لـ B<lio_listio>(3)."
370
371 #. type: Plain text
372 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
373 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
374 msgid ""
375 "In addition to the standard functions listed above, the GNU C library "
376 "provides the following extension to the POSIX AIO API:"
377 msgstr ""
378 "بالإضافة إلى الدوال القياسية المذكورة أعلاه، توفر مكتبة GNU C الامتداد "
379 "التالي لواجهة برمجة تطبيقات POSIX AIO:"
380
381 #. type: TP
382 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
383 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
384 #, no-wrap
385 msgid "B<aio_init>(3)"
386 msgstr "B<aio_init>(3)"
387
388 #. type: Plain text
389 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
390 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
391 msgid ""
392 "Set parameters for tuning the behavior of the glibc POSIX AIO implementation."
393 msgstr "ضبط المعاملات لضبط سلوك تطبيق glibc POSIX AIO."
394
395 #. type: SH
396 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
397 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
398 #, no-wrap
399 msgid "ERRORS"
400 msgstr "الأخطاء"
401
402 #. type: TP
403 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
404 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
405 #, no-wrap
406 msgid "B<EINVAL>"
407 msgstr "B<EINVAL>"
408
409 #. type: Plain text
410 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
411 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
412 msgid ""
413 "The I<aio_reqprio> field of the I<aiocb> structure was less than 0, or was "
414 "greater than the limit returned by the call "
415 "I<sysconf(_SC_AIO_PRIO_DELTA_MAX)>."
416 msgstr ""
417 "حقل I<aio_reqprio> في بنية I<aiocb> كان أقل من 0، أو أكبر من الحد الذي "
418 "أعادته استدعاء I<sysconf(_SC_AIO_PRIO_DELTA_MAX)>."
419
420 #. type: SH
421 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
422 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
423 #, no-wrap
424 msgid "STANDARDS"
425 msgstr "المعايير"
426
427 #. type: Plain text
428 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
429 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
430 msgid "POSIX.1-2008."
431 msgstr "POSIX.1-2008."
432
433 #. type: SH
434 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
435 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
436 #, no-wrap
437 msgid "HISTORY"
438 msgstr "التاريخ"
439
440 #. type: Plain text
441 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
442 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
443 msgid "POSIX.1-2001. glibc 2.1."
444 msgstr "POSIX.1-2001. glibc 2.1."
445
446 #. type: SH
447 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
448 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
449 #, no-wrap
450 msgid "NOTES"
451 msgstr "ملاحظات"
452
453 #. type: Plain text
454 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
455 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
456 msgid ""
457 "It is a good idea to zero out the control block buffer before use (see "
458 "B<memset>(3)). The control block buffer and the buffer pointed to by "
459 "I<aio_buf> must not be changed while the I/O operation is in progress. "
460 "These buffers must remain valid until the I/O operation completes."
461 msgstr ""
462 "من الجيد تصفير مخزن كتلة التحكم قبل الاستخدام (انظر B<memset>(3)). لا يجب "
463 "تغيير مخزن كتلة التحكم والمخزن المشار إليه بواسطة I<aio_buf> أثناء تنفيذ "
464 "عملية الإدخال/الإخراج. يجب أن تظل هذه المخازن صالحة حتى اكتمال عملية الإدخال/"
465 "الإخراج."
466
467 #. type: Plain text
468 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
469 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
470 msgid ""
471 "Simultaneous asynchronous read or write operations using the same I<aiocb> "
472 "structure yield undefined results."
473 msgstr ""
474 "عمليات القراءة أو الكتابة غير المتزامنة المتزامنة باستخدام نفس بنية I<aiocb> "
475 "تنتج نتائج غير محددة."
476
477 #. http://lse.sourceforge.net/io/aio.html
478 #. http://lse.sourceforge.net/io/aionotes.txt
479 #. http://lwn.net/Articles/148755/
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 "The current Linux POSIX AIO implementation is provided in user space by "
485 "glibc. This has a number of limitations, most notably that maintaining "
486 "multiple threads to perform I/O operations is expensive and scales poorly. "
487 "Work has been in progress for some time on a kernel state-machine-based "
488 "implementation of asynchronous I/O (see B<io_submit>(2), B<io_setup>(2), "
489 "B<io_cancel>(2), B<io_destroy>(2), B<io_getevents>(2)), but this "
490 "implementation hasn't yet matured to the point where the POSIX AIO "
491 "implementation can be completely reimplemented using the kernel system calls."
492 msgstr ""
493 "تطبيق Linux POSIX AIO الحالي يُقدم في مساحة المستخدم بواسطة glibc. هذا له عدد "
494 "من القيود، أبرزها أن الحفاظ على خيوط متعددة لتنفيذ عمليات الإدخال/الإخراج "
495 "مكلف ويواجه صعوبة في التوسع. العمل جارٍ منذ بعض الوقت على تطبيق قائم على آلة "
496 "حالة النواة للإدخال/الإخراج غير المتزامن (انظر B<io_submit>(2)، "
497 "B<io_setup>(2)، B<io_cancel>(2)، B<io_destroy>(2)، B<io_getevents>(2))، لكن "
498 "هذا التطبيق لم ينضج بعد إلى النقطة التي يمكن فيها إعادة تطبيق POSIX AIO "
499 "بالكامل باستخدام استدعاءات نظام النواة."
500
501 #. type: SH
502 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
503 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
504 #, no-wrap
505 msgid "EXAMPLES"
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 program below opens each of the files named in its command-line "
513 "arguments and queues a request on the resulting file descriptor using "
514 "B<aio_read>(3). The program then loops, periodically monitoring each of the "
515 "I/O operations that is still in progress using B<aio_error>(3). Each of the "
516 "I/O requests is set up to provide notification by delivery of a signal. "
517 "After all I/O requests have completed, the program retrieves their status "
518 "using B<aio_return>(3)."
519 msgstr ""
520 "البرنامج أدناه يفتح كل ملف مسمى في وسائط سطر الأوامر ويصطف طلبًا على واصف "
521 "الملف الناتج باستخدام B<aio_read>(3). ثم يتكرر البرنامج، مراقبًا دوريًا كل "
522 "عملية إدخال/إخراج لا تزال قيد التنفيذ باستخدام B<aio_error>(3). كل طلب إدخال/"
523 "إخراج يُعد لتوفير إشعار عن طريق تسليم إشارة. بعد اكتمال جميع طلبات الإدخال/"
524 "الإخراج، يسترجع البرنامج حالتها باستخدام B<aio_return>(3)."
525
526 #. type: Plain text
527 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
528 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
529 msgid ""
530 "The B<SIGQUIT> signal (generated by typing control-\\[rs]) causes the "
531 "program to request cancelation of each of the outstanding requests using "
532 "B<aio_cancel>(3)."
533 msgstr ""
534 "إشارة B<SIGQUIT> (التي تُولد بكتابة control-\\[rs]) تتسبب في طلب البرنامج "
535 "إلغاء كل طلب معلق باستخدام B<aio_cancel>(3)."
536
537 #. type: Plain text
538 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
539 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
540 msgid ""
541 "Here is an example of what we might see when running this program. In this "
542 "example, the program queues two requests to standard input, and these are "
543 "satisfied by two lines of input containing \"abc\" and \"x\"."
544 msgstr ""
545 "هذا مثال لما قد نراه عند تشغيل هذا البرنامج. في هذا المثال، يصطف البرنامج "
546 "طلبين إلى الإدخال القياسي، ويتم تلبيتهما بسطرين من الإدخال يحتويان على "
547 "\"abc\" و \"x\"."
548
549 #. type: Plain text
550 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
551 #: opensuse-tumbleweed
552 #, no-wrap
553 msgid ""
554 "$B< ./a.out /dev/stdin /dev/stdin>;\n"
555 "opened /dev/stdin on descriptor 3\n"
556 "opened /dev/stdin on descriptor 4\n"
557 "aio_error():\n"
558 " for request 0 (descriptor 3): In progress\n"
559 " for request 1 (descriptor 4): In progress\n"
560 "B<abc>\n"
561 "I/O completion signal received\n"
562 "aio_error():\n"
563 " for request 0 (descriptor 3): I/O succeeded\n"
564 " for request 1 (descriptor 4): In progress\n"
565 "aio_error():\n"
566 " for request 1 (descriptor 4): In progress\n"
567 "B<x>\n"
568 "I/O completion signal received\n"
569 "aio_error():\n"
570 " for request 1 (descriptor 4): I/O succeeded\n"
571 "All I/O requests completed\n"
572 "aio_return():\n"
573 " for request 0 (descriptor 3): 4\n"
574 " for request 1 (descriptor 4): 2\n"
575 msgstr ""
576 "$B< ./a.out /dev/stdin /dev/stdin>;\n"
577 "opened /dev/stdin on descriptor 3\n"
578 "opened /dev/stdin on descriptor 4\n"
579 "aio_error():\n"
580 " for request 0 (descriptor 3): In progress\n"
581 " for request 1 (descriptor 4): In progress\n"
582 "B<abc>\n"
583 "I/O completion signal received\n"
584 "aio_error():\n"
585 " for request 0 (descriptor 3): I/O succeeded\n"
586 " for request 1 (descriptor 4): In progress\n"
587 "aio_error():\n"
588 " for request 1 (descriptor 4): In progress\n"
589 "B<x>\n"
590 "I/O completion signal received\n"
591 "aio_error():\n"
592 " for request 1 (descriptor 4): I/O succeeded\n"
593 "All I/O requests completed\n"
594 "aio_return():\n"
595 " for request 0 (descriptor 3): 4\n"
596 " for request 1 (descriptor 4): 2\n"
597
598 #. type: SS
599 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
600 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
601 #, no-wrap
602 msgid "Program source"
603 msgstr "مصدر البرنامج"
604
605 #. type: Plain text
606 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
607 #: opensuse-tumbleweed
608 #, no-wrap
609 msgid ""
610 "#include E<lt>err.hE<gt>\n"
611 "#include E<lt>fcntl.hE<gt>\n"
612 "#include E<lt>stdlib.hE<gt>\n"
613 "#include E<lt>unistd.hE<gt>\n"
614 "#include E<lt>stdio.hE<gt>\n"
615 "#include E<lt>errno.hE<gt>\n"
616 "#include E<lt>aio.hE<gt>\n"
617 "#include E<lt>signal.hE<gt>\n"
618 "\\&\n"
619 "#define BUF_SIZE 20 /* Size of buffers for read operations */\n"
620 "\\&\n"
621 "struct ioRequest { /* Application-defined structure for tracking\n"
622 " I/O requests */\n"
623 " int reqNum;\n"
624 " int status;\n"
625 " struct aiocb *aiocbp;\n"
626 "};\n"
627 "\\&\n"
628 "static volatile sig_atomic_t gotSIGQUIT = 0;\n"
629 " /* On delivery of SIGQUIT, we attempt to\n"
630 " cancel all outstanding I/O requests */\n"
631 "\\&\n"
632 "static void /* Handler for SIGQUIT */\n"
633 "quitHandler(int sig)\n"
634 "{\n"
635 " gotSIGQUIT = 1;\n"
636 "}\n"
637 "\\&\n"
638 "#define IO_SIGNAL SIGUSR1 /* Signal used to notify I/O completion */\n"
639 "\\&\n"
640 "static void /* Handler for I/O completion signal */\n"
641 "aioSigHandler(int sig, siginfo_t *si, void *ucontext)\n"
642 "{\n"
643 " if (si-E<gt>si_code == SI_ASYNCIO) {\n"
644 " write(STDOUT_FILENO, \"I/O completion signal received\\[rs]n\", 31);\n"
645 "\\&\n"
646 " /* The corresponding ioRequest structure would be available as\n"
647 " struct ioRequest *ioReq = si-E<gt>si_value.sival_ptr;\n"
648 " and the file descriptor would then be available via\n"
649 " ioReq-E<gt>aiocbp-E<gt>aio_fildes */\n"
650 " }\n"
651 "}\n"
652 "\\&\n"
653 "int\n"
654 "main(int argc, char *argv[])\n"
655 "{\n"
656 " struct sigaction sa;\n"
657 " int s;\n"
658 " int numReqs; /* Total number of queued I/O requests */\n"
659 " int openReqs; /* Number of I/O requests still in progress */\n"
660 "\\&\n"
661 " if (argc E<lt> 2) {\n"
662 " fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt> E<lt>pathnameE<gt>...\\[rs]n\",\n"
663 " argv[0]);\n"
664 " exit(EXIT_FAILURE);\n"
665 " }\n"
666 "\\&\n"
667 " numReqs = argc - 1;\n"
668 "\\&\n"
669 " /* Allocate our arrays. */\n"
670 "\\&\n"
671 " struct ioRequest *ioList = calloc(numReqs, sizeof(*ioList));\n"
672 " if (ioList == NULL)\n"
673 " err(EXIT_FAILURE, \"calloc\");\n"
674 "\\&\n"
675 " struct aiocb *aiocbList = calloc(numReqs, sizeof(*aiocbList));\n"
676 " if (aiocbList == NULL)\n"
677 " err(EXIT_FAILURE, \"calloc\");\n"
678 "\\&\n"
679 " /* Establish handlers for SIGQUIT and the I/O completion signal. */\n"
680 "\\&\n"
681 " sa.sa_flags = SA_RESTART;\n"
682 " sigemptyset(&sa.sa_mask);\n"
683 "\\&\n"
684 " sa.sa_handler = quitHandler;\n"
685 " if (sigaction(SIGQUIT, &sa, NULL) == -1)\n"
686 " err(EXIT_FAILURE, \"sigaction\");\n"
687 "\\&\n"
688 " sa.sa_flags = SA_RESTART | SA_SIGINFO;\n"
689 " sa.sa_sigaction = aioSigHandler;\n"
690 " if (sigaction(IO_SIGNAL, &sa, NULL) == -1)\n"
691 " err(EXIT_FAILURE, \"sigaction\");\n"
692 "\\&\n"
693 " /* Open each file specified on the command line, and queue\n"
694 " a read request on the resulting file descriptor. */\n"
695 "\\&\n"
696 " for (size_t j = 0; j E<lt> numReqs; j++) {\n"
697 " ioList[j].reqNum = j;\n"
698 " ioList[j].status = EINPROGRESS;\n"
699 " ioList[j].aiocbp = &aiocbList[j];\n"
700 "\\&\n"
701 " ioList[j].aiocbp-E<gt>aio_fildes = open(argv[j + 1], O_RDONLY);\n"
702 " if (ioList[j].aiocbp-E<gt>aio_fildes == -1)\n"
703 " err(EXIT_FAILURE, \"open\");\n"
704 " printf(\"opened %s on descriptor %d\\[rs]n\", argv[j + 1],\n"
705 " ioList[j].aiocbp-E<gt>aio_fildes);\n"
706 "\\&\n"
707 " ioList[j].aiocbp-E<gt>aio_buf = malloc(BUF_SIZE);\n"
708 " if (ioList[j].aiocbp-E<gt>aio_buf == NULL)\n"
709 " err(EXIT_FAILURE, \"malloc\");\n"
710 "\\&\n"
711 " ioList[j].aiocbp-E<gt>aio_nbytes = BUF_SIZE;\n"
712 " ioList[j].aiocbp-E<gt>aio_reqprio = 0;\n"
713 " ioList[j].aiocbp-E<gt>aio_offset = 0;\n"
714 " ioList[j].aiocbp-E<gt>aio_sigevent.sigev_notify = SIGEV_SIGNAL;\n"
715 " ioList[j].aiocbp-E<gt>aio_sigevent.sigev_signo = IO_SIGNAL;\n"
716 " ioList[j].aiocbp-E<gt>aio_sigevent.sigev_value.sival_ptr =\n"
717 " &ioList[j];\n"
718 "\\&\n"
719 " s = aio_read(ioList[j].aiocbp);\n"
720 " if (s == -1)\n"
721 " err(EXIT_FAILURE, \"aio_read\");\n"
722 " }\n"
723 "\\&\n"
724 " openReqs = numReqs;\n"
725 "\\&\n"
726 " /* Loop, monitoring status of I/O requests. */\n"
727 "\\&\n"
728 " while (openReqs E<gt> 0) {\n"
729 " sleep(3); /* Delay between each monitoring step */\n"
730 "\\&\n"
731 " if (gotSIGQUIT) {\n"
732 "\\&\n"
733 " /* On receipt of SIGQUIT, attempt to cancel each of the\n"
734 " outstanding I/O requests, and display status returned\n"
735 " from the cancelation requests. */\n"
736 "\\&\n"
737 " printf(\"got SIGQUIT; canceling I/O requests: \\[rs]n\");\n"
738 "\\&\n"
739 " for (size_t j = 0; j E<lt> numReqs; j++) {\n"
740 " if (ioList[j].status == EINPROGRESS) {\n"
741 " printf(\" Request %zu on descriptor %d:\", j,\n"
742 " ioList[j].aiocbp-E<gt>aio_fildes);\n"
743 " s = aio_cancel(ioList[j].aiocbp-E<gt>aio_fildes,\n"
744 " ioList[j].aiocbp);\n"
745 " if (s == AIO_CANCELED)\n"
746 " printf(\"I/O canceled\\[rs]n\");\n"
747 " else if (s == AIO_NOTCANCELED)\n"
748 " printf(\"I/O not canceled\\[rs]n\");\n"
749 " else if (s == AIO_ALLDONE)\n"
750 " printf(\"I/O all done\\[rs]n\");\n"
751 " else\n"
752 " perror(\"aio_cancel\");\n"
753 " }\n"
754 " }\n"
755 "\\&\n"
756 " gotSIGQUIT = 0;\n"
757 " }\n"
758 "\\&\n"
759 " /* Check the status of each I/O request that is still\n"
760 " in progress. */\n"
761 "\\&\n"
762 " printf(\"aio_error():\\[rs]n\");\n"
763 " for (size_t j = 0; j E<lt> numReqs; j++) {\n"
764 " if (ioList[j].status == EINPROGRESS) {\n"
765 " printf(\" for request %zu (descriptor %d): \",\n"
766 " j, ioList[j].aiocbp-E<gt>aio_fildes);\n"
767 " ioList[j].status = aio_error(ioList[j].aiocbp);\n"
768 "\\&\n"
769 " switch (ioList[j].status) {\n"
770 " case 0:\n"
771 " printf(\"I/O succeeded\\[rs]n\");\n"
772 " break;\n"
773 " case EINPROGRESS:\n"
774 " printf(\"In progress\\[rs]n\");\n"
775 " break;\n"
776 " case ECANCELED:\n"
777 " printf(\"Canceled\\[rs]n\");\n"
778 " break;\n"
779 " default:\n"
780 " perror(\"aio_error\");\n"
781 " break;\n"
782 " }\n"
783 "\\&\n"
784 " if (ioList[j].status != EINPROGRESS)\n"
785 " openReqs--;\n"
786 " }\n"
787 " }\n"
788 " }\n"
789 "\\&\n"
790 " printf(\"All I/O requests completed\\[rs]n\");\n"
791 "\\&\n"
792 " /* Check status return of all I/O requests. */\n"
793 "\\&\n"
794 " printf(\"aio_return():\\[rs]n\");\n"
795 " for (size_t j = 0; j E<lt> numReqs; j++) {\n"
796 " ssize_t s;\n"
797 "\\&\n"
798 " s = aio_return(ioList[j].aiocbp);\n"
799 " printf(\" for request %zu (descriptor %d): %zd\\[rs]n\",\n"
800 " j, ioList[j].aiocbp-E<gt>aio_fildes, s);\n"
801 " }\n"
802 "\\&\n"
803 " exit(EXIT_SUCCESS);\n"
804 "}\n"
805 msgstr ""
806 "#include E<lt>err.hE<gt>\n"
807 "#include E<lt>fcntl.hE<gt>\n"
808 "#include E<lt>stdlib.hE<gt>\n"
809 "#include E<lt>unistd.hE<gt>\n"
810 "#include E<lt>stdio.hE<gt>\n"
811 "#include E<lt>errno.hE<gt>\n"
812 "#include E<lt>aio.hE<gt>\n"
813 "#include E<lt>signal.hE<gt>\n"
814 "\\&\n"
815 "#define BUF_SIZE 20 /* Size of buffers for read operations */\n"
816 "\\&\n"
817 "struct ioRequest { /* Application-defined structure for tracking\n"
818 " I/O requests */\n"
819 " int reqNum;\n"
820 " int status;\n"
821 " struct aiocb *aiocbp;\n"
822 "};\n"
823 "\\&\n"
824 "static volatile sig_atomic_t gotSIGQUIT = 0;\n"
825 " /* On delivery of SIGQUIT, we attempt to\n"
826 " cancel all outstanding I/O requests */\n"
827 "\\&\n"
828 "static void /* Handler for SIGQUIT */\n"
829 "quitHandler(int sig)\n"
830 "{\n"
831 " gotSIGQUIT = 1;\n"
832 "}\n"
833 "\\&\n"
834 "#define IO_SIGNAL SIGUSR1 /* Signal used to notify I/O completion */\n"
835 "\\&\n"
836 "static void /* Handler for I/O completion signal */\n"
837 "aioSigHandler(int sig, siginfo_t *si, void *ucontext)\n"
838 "{\n"
839 " if (si-E<gt>si_code == SI_ASYNCIO) {\n"
840 " write(STDOUT_FILENO, \"I/O completion signal received\\[rs]n\", 31);\n"
841 "\\&\n"
842 " /* The corresponding ioRequest structure would be available as\n"
843 " struct ioRequest *ioReq = si-E<gt>si_value.sival_ptr;\n"
844 " and the file descriptor would then be available via\n"
845 " ioReq-E<gt>aiocbp-E<gt>aio_fildes */\n"
846 " }\n"
847 "}\n"
848 "\\&\n"
849 "int\n"
850 "main(int argc, char *argv[])\n"
851 "{\n"
852 " struct sigaction sa;\n"
853 " int s;\n"
854 " int numReqs; /* Total number of queued I/O requests */\n"
855 " int openReqs; /* Number of I/O requests still in progress */\n"
856 "\\&\n"
857 " if (argc E<lt> 2) {\n"
858 " fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt> E<lt>pathnameE<gt>...\\[rs]n\",\n"
859 " argv[0]);\n"
860 " exit(EXIT_FAILURE);\n"
861 " }\n"
862 "\\&\n"
863 " numReqs = argc - 1;\n"
864 "\\&\n"
865 " /* Allocate our arrays. */\n"
866 "\\&\n"
867 " struct ioRequest *ioList = calloc(numReqs, sizeof(*ioList));\n"
868 " if (ioList == NULL)\n"
869 " err(EXIT_FAILURE, \"calloc\");\n"
870 "\\&\n"
871 " struct aiocb *aiocbList = calloc(numReqs, sizeof(*aiocbList));\n"
872 " if (aiocbList == NULL)\n"
873 " err(EXIT_FAILURE, \"calloc\");\n"
874 "\\&\n"
875 " /* Establish handlers for SIGQUIT and the I/O completion signal. */\n"
876 "\\&\n"
877 " sa.sa_flags = SA_RESTART;\n"
878 " sigemptyset(&sa.sa_mask);\n"
879 "\\&\n"
880 " sa.sa_handler = quitHandler;\n"
881 " if (sigaction(SIGQUIT, &sa, NULL) == -1)\n"
882 " err(EXIT_FAILURE, \"sigaction\");\n"
883 "\\&\n"
884 " sa.sa_flags = SA_RESTART | SA_SIGINFO;\n"
885 " sa.sa_sigaction = aioSigHandler;\n"
886 " if (sigaction(IO_SIGNAL, &sa, NULL) == -1)\n"
887 " err(EXIT_FAILURE, \"sigaction\");\n"
888 "\\&\n"
889 " /* Open each file specified on the command line, and queue\n"
890 " a read request on the resulting file descriptor. */\n"
891 "\\&\n"
892 " for (size_t j = 0; j E<lt> numReqs; j++) {\n"
893 " ioList[j].reqNum = j;\n"
894 " ioList[j].status = EINPROGRESS;\n"
895 " ioList[j].aiocbp = &aiocbList[j];\n"
896 "\\&\n"
897 " ioList[j].aiocbp-E<gt>aio_fildes = open(argv[j + 1], O_RDONLY);\n"
898 " if (ioList[j].aiocbp-E<gt>aio_fildes == -1)\n"
899 " err(EXIT_FAILURE, \"open\");\n"
900 " printf(\"opened %s on descriptor %d\\[rs]n\", argv[j + 1],\n"
901 " ioList[j].aiocbp-E<gt>aio_fildes);\n"
902 "\\&\n"
903 " ioList[j].aiocbp-E<gt>aio_buf = malloc(BUF_SIZE);\n"
904 " if (ioList[j].aiocbp-E<gt>aio_buf == NULL)\n"
905 " err(EXIT_FAILURE, \"malloc\");\n"
906 "\\&\n"
907 " ioList[j].aiocbp-E<gt>aio_nbytes = BUF_SIZE;\n"
908 " ioList[j].aiocbp-E<gt>aio_reqprio = 0;\n"
909 " ioList[j].aiocbp-E<gt>aio_offset = 0;\n"
910 " ioList[j].aiocbp-E<gt>aio_sigevent.sigev_notify = SIGEV_SIGNAL;\n"
911 " ioList[j].aiocbp-E<gt>aio_sigevent.sigev_signo = IO_SIGNAL;\n"
912 " ioList[j].aiocbp-E<gt>aio_sigevent.sigev_value.sival_ptr =\n"
913 " &ioList[j];\n"
914 "\\&\n"
915 " s = aio_read(ioList[j].aiocbp);\n"
916 " if (s == -1)\n"
917 " err(EXIT_FAILURE, \"aio_read\");\n"
918 " }\n"
919 "\\&\n"
920 " openReqs = numReqs;\n"
921 "\\&\n"
922 " /* Loop, monitoring status of I/O requests. */\n"
923 "\\&\n"
924 " while (openReqs E<gt> 0) {\n"
925 " sleep(3); /* Delay between each monitoring step */\n"
926 "\\&\n"
927 " if (gotSIGQUIT) {\n"
928 "\\&\n"
929 " /* On receipt of SIGQUIT, attempt to cancel each of the\n"
930 " outstanding I/O requests, and display status returned\n"
931 " from the cancelation requests. */\n"
932 "\\&\n"
933 " printf(\"got SIGQUIT; canceling I/O requests: \\[rs]n\");\n"
934 "\\&\n"
935 " for (size_t j = 0; j E<lt> numReqs; j++) {\n"
936 " if (ioList[j].status == EINPROGRESS) {\n"
937 " printf(\" Request %zu on descriptor %d:\", j,\n"
938 " ioList[j].aiocbp-E<gt>aio_fildes);\n"
939 " s = aio_cancel(ioList[j].aiocbp-E<gt>aio_fildes,\n"
940 " ioList[j].aiocbp);\n"
941 " if (s == AIO_CANCELED)\n"
942 " printf(\"I/O canceled\\[rs]n\");\n"
943 " else if (s == AIO_NOTCANCELED)\n"
944 " printf(\"I/O not canceled\\[rs]n\");\n"
945 " else if (s == AIO_ALLDONE)\n"
946 " printf(\"I/O all done\\[rs]n\");\n"
947 " else\n"
948 " perror(\"aio_cancel\");\n"
949 " }\n"
950 " }\n"
951 "\\&\n"
952 " gotSIGQUIT = 0;\n"
953 " }\n"
954 "\\&\n"
955 " /* Check the status of each I/O request that is still\n"
956 " in progress. */\n"
957 "\\&\n"
958 " printf(\"aio_error():\\[rs]n\");\n"
959 " for (size_t j = 0; j E<lt> numReqs; j++) {\n"
960 " if (ioList[j].status == EINPROGRESS) {\n"
961 " printf(\" for request %zu (descriptor %d): \",\n"
962 " j, ioList[j].aiocbp-E<gt>aio_fildes);\n"
963 " ioList[j].status = aio_error(ioList[j].aiocbp);\n"
964 "\\&\n"
965 " switch (ioList[j].status) {\n"
966 " case 0:\n"
967 " printf(\"I/O succeeded\\[rs]n\");\n"
968 " break;\n"
969 " case EINPROGRESS:\n"
970 " printf(\"In progress\\[rs]n\");\n"
971 " break;\n"
972 " case ECANCELED:\n"
973 " printf(\"Canceled\\[rs]n\");\n"
974 " break;\n"
975 " default:\n"
976 " perror(\"aio_error\");\n"
977 " break;\n"
978 " }\n"
979 "\\&\n"
980 " if (ioList[j].status != EINPROGRESS)\n"
981 " openReqs--;\n"
982 " }\n"
983 " }\n"
984 " }\n"
985 "\\&\n"
986 " printf(\"All I/O requests completed\\[rs]n\");\n"
987 "\\&\n"
988 " /* Check status return of all I/O requests. */\n"
989 "\\&\n"
990 " printf(\"aio_return():\\[rs]n\");\n"
991 " for (size_t j = 0; j E<lt> numReqs; j++) {\n"
992 " ssize_t s;\n"
993 "\\&\n"
994 " s = aio_return(ioList[j].aiocbp);\n"
995 " printf(\" for request %zu (descriptor %d): %zd\\[rs]n\",\n"
996 " j, ioList[j].aiocbp-E<gt>aio_fildes, s);\n"
997 " }\n"
998 "\\&\n"
999 " exit(EXIT_SUCCESS);\n"
1000 "}\n"
1001
1002 #. type: SH
1003 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1004 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1005 #, no-wrap
1006 msgid "SEE ALSO"
1007 msgstr "انظر أيضًا"
1008
1009 #. type: Plain text
1010 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1011 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1012 msgid ""
1013 "B<io_cancel>(2), B<io_destroy>(2), B<io_getevents>(2), B<io_setup>(2), "
1014 "B<io_submit>(2), B<aio_cancel>(3), B<aio_error>(3), B<aio_init>(3), "
1015 "B<aio_read>(3), B<aio_return>(3), B<aio_write>(3), B<lio_listio>(3)"
1016 msgstr ""
1017 "B<io_cancel>(2), B<io_destroy>(2), B<io_getevents>(2), B<io_setup>(2), "
1018 "B<io_submit>(2), B<aio_cancel>(3), B<aio_error>(3), B<aio_init>(3), "
1019 "B<aio_read>(3), B<aio_return>(3), B<aio_write>(3), B<lio_listio>(3)"
1020
1021 #. type: Plain text
1022 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1023 #: opensuse-tumbleweed
1024 msgid ""
1025 "\"Asynchronous I/O Support in Linux 2.5\", Bhattacharya, Pratt, Pulavarty, "
1026 "and Morgan, Proceedings of the Linux Symposium, 2003, E<.UR https:\\://www."
1027 "kernel.org/doc/ols/2003/ols2003-pages-351-366.pdf> E<.UE>"
1028 msgstr ""
1029 "”دعم عمليات الإدخال/الإخراج غير المتزامنة في لينكس 2.5“، باتشاريا، برات، "
1030 "بولافارتي، ومورغان، وقائع ندوة لينكس، 2003، E<.UR https:\\://www.kernel.org/"
1031 "doc/ols/2003/ols2003-pages-351-366.pdf> E<.UE>"
1032
1033 #. type: TH
1034 #: debian-trixie fedora-44 fedora-rawhide
1035 #, no-wrap
1036 msgid "2024-06-15"
1037 msgstr "15 يونيو 2024"
1038
1039 #. type: TH
1040 #: debian-trixie
1041 #, no-wrap
1042 msgid "Linux man-pages 6.9.1"
1043 msgstr "صفحات دليل لينكس 6.9.1"
1044
1045 #. type: Plain text
1046 #: debian-trixie fedora-44 fedora-rawhide
1047 #, no-wrap
1048 msgid ""
1049 "$ B<./a.out /dev/stdin /dev/stdin>\n"
1050 "opened /dev/stdin on descriptor 3\n"
1051 "opened /dev/stdin on descriptor 4\n"
1052 "aio_error():\n"
1053 " for request 0 (descriptor 3): In progress\n"
1054 " for request 1 (descriptor 4): In progress\n"
1055 "B<abc>\n"
1056 "I/O completion signal received\n"
1057 "aio_error():\n"
1058 " for request 0 (descriptor 3): I/O succeeded\n"
1059 " for request 1 (descriptor 4): In progress\n"
1060 "aio_error():\n"
1061 " for request 1 (descriptor 4): In progress\n"
1062 "B<x>\n"
1063 "I/O completion signal received\n"
1064 "aio_error():\n"
1065 " for request 1 (descriptor 4): I/O succeeded\n"
1066 "All I/O requests completed\n"
1067 "aio_return():\n"
1068 " for request 0 (descriptor 3): 4\n"
1069 " for request 1 (descriptor 4): 2\n"
1070 msgstr ""
1071 "$ B<./a.out /dev/stdin /dev/stdin>\n"
1072 "opened /dev/stdin on descriptor 3\n"
1073 "opened /dev/stdin on descriptor 4\n"
1074 "aio_error():\n"
1075 " for request 0 (descriptor 3): In progress\n"
1076 " for request 1 (descriptor 4): In progress\n"
1077 "B<abc>\n"
1078 "I/O completion signal received\n"
1079 "aio_error():\n"
1080 " for request 0 (descriptor 3): I/O succeeded\n"
1081 " for request 1 (descriptor 4): In progress\n"
1082 "aio_error():\n"
1083 " for request 1 (descriptor 4): In progress\n"
1084 "B<x>\n"
1085 "I/O completion signal received\n"
1086 "aio_error():\n"
1087 " for request 1 (descriptor 4): I/O succeeded\n"
1088 "All I/O requests completed\n"
1089 "aio_return():\n"
1090 " for request 0 (descriptor 3): 4\n"
1091 " for request 1 (descriptor 4): 2\n"
1092
1093 #. type: Plain text
1094 #: debian-trixie fedora-44 fedora-rawhide
1095 #, no-wrap
1096 msgid ""
1097 "#include E<lt>fcntl.hE<gt>\n"
1098 "#include E<lt>stdlib.hE<gt>\n"
1099 "#include E<lt>unistd.hE<gt>\n"
1100 "#include E<lt>stdio.hE<gt>\n"
1101 "#include E<lt>errno.hE<gt>\n"
1102 "#include E<lt>aio.hE<gt>\n"
1103 "#include E<lt>signal.hE<gt>\n"
1104 "\\&\n"
1105 "#define BUF_SIZE 20 /* Size of buffers for read operations */\n"
1106 "\\&\n"
1107 "#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1108 "\\&\n"
1109 "struct ioRequest { /* Application-defined structure for tracking\n"
1110 " I/O requests */\n"
1111 " int reqNum;\n"
1112 " int status;\n"
1113 " struct aiocb *aiocbp;\n"
1114 "};\n"
1115 "\\&\n"
1116 "static volatile sig_atomic_t gotSIGQUIT = 0;\n"
1117 " /* On delivery of SIGQUIT, we attempt to\n"
1118 " cancel all outstanding I/O requests */\n"
1119 "\\&\n"
1120 "static void /* Handler for SIGQUIT */\n"
1121 "quitHandler(int sig)\n"
1122 "{\n"
1123 " gotSIGQUIT = 1;\n"
1124 "}\n"
1125 "\\&\n"
1126 "#define IO_SIGNAL SIGUSR1 /* Signal used to notify I/O completion */\n"
1127 "\\&\n"
1128 "static void /* Handler for I/O completion signal */\n"
1129 "aioSigHandler(int sig, siginfo_t *si, void *ucontext)\n"
1130 "{\n"
1131 " if (si-E<gt>si_code == SI_ASYNCIO) {\n"
1132 " write(STDOUT_FILENO, \"I/O completion signal received\\[rs]n\", 31);\n"
1133 "\\&\n"
1134 " /* The corresponding ioRequest structure would be available as\n"
1135 " struct ioRequest *ioReq = si-E<gt>si_value.sival_ptr;\n"
1136 " and the file descriptor would then be available via\n"
1137 " ioReq-E<gt>aiocbp-E<gt>aio_fildes */\n"
1138 " }\n"
1139 "}\n"
1140 "\\&\n"
1141 "int\n"
1142 "main(int argc, char *argv[])\n"
1143 "{\n"
1144 " struct sigaction sa;\n"
1145 " int s;\n"
1146 " int numReqs; /* Total number of queued I/O requests */\n"
1147 " int openReqs; /* Number of I/O requests still in progress */\n"
1148 "\\&\n"
1149 " if (argc E<lt> 2) {\n"
1150 " fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt> E<lt>pathnameE<gt>...\\[rs]n\",\n"
1151 " argv[0]);\n"
1152 " exit(EXIT_FAILURE);\n"
1153 " }\n"
1154 "\\&\n"
1155 " numReqs = argc - 1;\n"
1156 "\\&\n"
1157 " /* Allocate our arrays. */\n"
1158 "\\&\n"
1159 " struct ioRequest *ioList = calloc(numReqs, sizeof(*ioList));\n"
1160 " if (ioList == NULL)\n"
1161 " errExit(\"calloc\");\n"
1162 "\\&\n"
1163 " struct aiocb *aiocbList = calloc(numReqs, sizeof(*aiocbList));\n"
1164 " if (aiocbList == NULL)\n"
1165 " errExit(\"calloc\");\n"
1166 "\\&\n"
1167 " /* Establish handlers for SIGQUIT and the I/O completion signal. */\n"
1168 "\\&\n"
1169 " sa.sa_flags = SA_RESTART;\n"
1170 " sigemptyset(&sa.sa_mask);\n"
1171 "\\&\n"
1172 " sa.sa_handler = quitHandler;\n"
1173 " if (sigaction(SIGQUIT, &sa, NULL) == -1)\n"
1174 " errExit(\"sigaction\");\n"
1175 "\\&\n"
1176 " sa.sa_flags = SA_RESTART | SA_SIGINFO;\n"
1177 " sa.sa_sigaction = aioSigHandler;\n"
1178 " if (sigaction(IO_SIGNAL, &sa, NULL) == -1)\n"
1179 " errExit(\"sigaction\");\n"
1180 "\\&\n"
1181 " /* Open each file specified on the command line, and queue\n"
1182 " a read request on the resulting file descriptor. */\n"
1183 "\\&\n"
1184 " for (size_t j = 0; j E<lt> numReqs; j++) {\n"
1185 " ioList[j].reqNum = j;\n"
1186 " ioList[j].status = EINPROGRESS;\n"
1187 " ioList[j].aiocbp = &aiocbList[j];\n"
1188 "\\&\n"
1189 " ioList[j].aiocbp-E<gt>aio_fildes = open(argv[j + 1], O_RDONLY);\n"
1190 " if (ioList[j].aiocbp-E<gt>aio_fildes == -1)\n"
1191 " errExit(\"open\");\n"
1192 " printf(\"opened %s on descriptor %d\\[rs]n\", argv[j + 1],\n"
1193 " ioList[j].aiocbp-E<gt>aio_fildes);\n"
1194 "\\&\n"
1195 " ioList[j].aiocbp-E<gt>aio_buf = malloc(BUF_SIZE);\n"
1196 " if (ioList[j].aiocbp-E<gt>aio_buf == NULL)\n"
1197 " errExit(\"malloc\");\n"
1198 "\\&\n"
1199 " ioList[j].aiocbp-E<gt>aio_nbytes = BUF_SIZE;\n"
1200 " ioList[j].aiocbp-E<gt>aio_reqprio = 0;\n"
1201 " ioList[j].aiocbp-E<gt>aio_offset = 0;\n"
1202 " ioList[j].aiocbp-E<gt>aio_sigevent.sigev_notify = SIGEV_SIGNAL;\n"
1203 " ioList[j].aiocbp-E<gt>aio_sigevent.sigev_signo = IO_SIGNAL;\n"
1204 " ioList[j].aiocbp-E<gt>aio_sigevent.sigev_value.sival_ptr =\n"
1205 " &ioList[j];\n"
1206 "\\&\n"
1207 " s = aio_read(ioList[j].aiocbp);\n"
1208 " if (s == -1)\n"
1209 " errExit(\"aio_read\");\n"
1210 " }\n"
1211 "\\&\n"
1212 " openReqs = numReqs;\n"
1213 "\\&\n"
1214 " /* Loop, monitoring status of I/O requests. */\n"
1215 "\\&\n"
1216 " while (openReqs E<gt> 0) {\n"
1217 " sleep(3); /* Delay between each monitoring step */\n"
1218 "\\&\n"
1219 " if (gotSIGQUIT) {\n"
1220 "\\&\n"
1221 " /* On receipt of SIGQUIT, attempt to cancel each of the\n"
1222 " outstanding I/O requests, and display status returned\n"
1223 " from the cancelation requests. */\n"
1224 "\\&\n"
1225 " printf(\"got SIGQUIT; canceling I/O requests: \\[rs]n\");\n"
1226 "\\&\n"
1227 " for (size_t j = 0; j E<lt> numReqs; j++) {\n"
1228 " if (ioList[j].status == EINPROGRESS) {\n"
1229 " printf(\" Request %zu on descriptor %d:\", j,\n"
1230 " ioList[j].aiocbp-E<gt>aio_fildes);\n"
1231 " s = aio_cancel(ioList[j].aiocbp-E<gt>aio_fildes,\n"
1232 " ioList[j].aiocbp);\n"
1233 " if (s == AIO_CANCELED)\n"
1234 " printf(\"I/O canceled\\[rs]n\");\n"
1235 " else if (s == AIO_NOTCANCELED)\n"
1236 " printf(\"I/O not canceled\\[rs]n\");\n"
1237 " else if (s == AIO_ALLDONE)\n"
1238 " printf(\"I/O all done\\[rs]n\");\n"
1239 " else\n"
1240 " perror(\"aio_cancel\");\n"
1241 " }\n"
1242 " }\n"
1243 "\\&\n"
1244 " gotSIGQUIT = 0;\n"
1245 " }\n"
1246 "\\&\n"
1247 " /* Check the status of each I/O request that is still\n"
1248 " in progress. */\n"
1249 "\\&\n"
1250 " printf(\"aio_error():\\[rs]n\");\n"
1251 " for (size_t j = 0; j E<lt> numReqs; j++) {\n"
1252 " if (ioList[j].status == EINPROGRESS) {\n"
1253 " printf(\" for request %zu (descriptor %d): \",\n"
1254 " j, ioList[j].aiocbp-E<gt>aio_fildes);\n"
1255 " ioList[j].status = aio_error(ioList[j].aiocbp);\n"
1256 "\\&\n"
1257 " switch (ioList[j].status) {\n"
1258 " case 0:\n"
1259 " printf(\"I/O succeeded\\[rs]n\");\n"
1260 " break;\n"
1261 " case EINPROGRESS:\n"
1262 " printf(\"In progress\\[rs]n\");\n"
1263 " break;\n"
1264 " case ECANCELED:\n"
1265 " printf(\"Canceled\\[rs]n\");\n"
1266 " break;\n"
1267 " default:\n"
1268 " perror(\"aio_error\");\n"
1269 " break;\n"
1270 " }\n"
1271 "\\&\n"
1272 " if (ioList[j].status != EINPROGRESS)\n"
1273 " openReqs--;\n"
1274 " }\n"
1275 " }\n"
1276 " }\n"
1277 "\\&\n"
1278 " printf(\"All I/O requests completed\\[rs]n\");\n"
1279 "\\&\n"
1280 " /* Check status return of all I/O requests. */\n"
1281 "\\&\n"
1282 " printf(\"aio_return():\\[rs]n\");\n"
1283 " for (size_t j = 0; j E<lt> numReqs; j++) {\n"
1284 " ssize_t s;\n"
1285 "\\&\n"
1286 " s = aio_return(ioList[j].aiocbp);\n"
1287 " printf(\" for request %zu (descriptor %d): %zd\\[rs]n\",\n"
1288 " j, ioList[j].aiocbp-E<gt>aio_fildes, s);\n"
1289 " }\n"
1290 "\\&\n"
1291 " exit(EXIT_SUCCESS);\n"
1292 "}\n"
1293 msgstr ""
1294 "#include E<lt>fcntl.hE<gt>\n"
1295 "#include E<lt>stdlib.hE<gt>\n"
1296 "#include E<lt>unistd.hE<gt>\n"
1297 "#include E<lt>stdio.hE<gt>\n"
1298 "#include E<lt>errno.hE<gt>\n"
1299 "#include E<lt>aio.hE<gt>\n"
1300 "#include E<lt>signal.hE<gt>\n"
1301 "\\&\n"
1302 "#define BUF_SIZE 20 /* Size of buffers for read operations */\n"
1303 "\\&\n"
1304 "#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1305 "\\&\n"
1306 "struct ioRequest { /* Application-defined structure for tracking\n"
1307 " I/O requests */\n"
1308 " int reqNum;\n"
1309 " int status;\n"
1310 " struct aiocb *aiocbp;\n"
1311 "};\n"
1312 "\\&\n"
1313 "static volatile sig_atomic_t gotSIGQUIT = 0;\n"
1314 " /* On delivery of SIGQUIT, we attempt to\n"
1315 " cancel all outstanding I/O requests */\n"
1316 "\\&\n"
1317 "static void /* Handler for SIGQUIT */\n"
1318 "quitHandler(int sig)\n"
1319 "{\n"
1320 " gotSIGQUIT = 1;\n"
1321 "}\n"
1322 "\\&\n"
1323 "#define IO_SIGNAL SIGUSR1 /* Signal used to notify I/O completion */\n"
1324 "\\&\n"
1325 "static void /* Handler for I/O completion signal */\n"
1326 "aioSigHandler(int sig, siginfo_t *si, void *ucontext)\n"
1327 "{\n"
1328 " if (si-E<gt>si_code == SI_ASYNCIO) {\n"
1329 " write(STDOUT_FILENO, \"I/O completion signal received\\[rs]n\", 31);\n"
1330 "\\&\n"
1331 " /* The corresponding ioRequest structure would be available as\n"
1332 " struct ioRequest *ioReq = si-E<gt>si_value.sival_ptr;\n"
1333 " and the file descriptor would then be available via\n"
1334 " ioReq-E<gt>aiocbp-E<gt>aio_fildes */\n"
1335 " }\n"
1336 "}\n"
1337 "\\&\n"
1338 "int\n"
1339 "main(int argc, char *argv[])\n"
1340 "{\n"
1341 " struct sigaction sa;\n"
1342 " int s;\n"
1343 " int numReqs; /* Total number of queued I/O requests */\n"
1344 " int openReqs; /* Number of I/O requests still in progress */\n"
1345 "\\&\n"
1346 " if (argc E<lt> 2) {\n"
1347 " fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt> E<lt>pathnameE<gt>...\\[rs]n\",\n"
1348 " argv[0]);\n"
1349 " exit(EXIT_FAILURE);\n"
1350 " }\n"
1351 "\\&\n"
1352 " numReqs = argc - 1;\n"
1353 "\\&\n"
1354 " /* Allocate our arrays. */\n"
1355 "\\&\n"
1356 " struct ioRequest *ioList = calloc(numReqs, sizeof(*ioList));\n"
1357 " if (ioList == NULL)\n"
1358 " errExit(\"calloc\");\n"
1359 "\\&\n"
1360 " struct aiocb *aiocbList = calloc(numReqs, sizeof(*aiocbList));\n"
1361 " if (aiocbList == NULL)\n"
1362 " errExit(\"calloc\");\n"
1363 "\\&\n"
1364 " /* Establish handlers for SIGQUIT and the I/O completion signal. */\n"
1365 "\\&\n"
1366 " sa.sa_flags = SA_RESTART;\n"
1367 " sigemptyset(&sa.sa_mask);\n"
1368 "\\&\n"
1369 " sa.sa_handler = quitHandler;\n"
1370 " if (sigaction(SIGQUIT, &sa, NULL) == -1)\n"
1371 " errExit(\"sigaction\");\n"
1372 "\\&\n"
1373 " sa.sa_flags = SA_RESTART | SA_SIGINFO;\n"
1374 " sa.sa_sigaction = aioSigHandler;\n"
1375 " if (sigaction(IO_SIGNAL, &sa, NULL) == -1)\n"
1376 " errExit(\"sigaction\");\n"
1377 "\\&\n"
1378 " /* Open each file specified on the command line, and queue\n"
1379 " a read request on the resulting file descriptor. */\n"
1380 "\\&\n"
1381 " for (size_t j = 0; j E<lt> numReqs; j++) {\n"
1382 " ioList[j].reqNum = j;\n"
1383 " ioList[j].status = EINPROGRESS;\n"
1384 " ioList[j].aiocbp = &aiocbList[j];\n"
1385 "\\&\n"
1386 " ioList[j].aiocbp-E<gt>aio_fildes = open(argv[j + 1], O_RDONLY);\n"
1387 " if (ioList[j].aiocbp-E<gt>aio_fildes == -1)\n"
1388 " errExit(\"open\");\n"
1389 " printf(\"opened %s on descriptor %d\\[rs]n\", argv[j + 1],\n"
1390 " ioList[j].aiocbp-E<gt>aio_fildes);\n"
1391 "\\&\n"
1392 " ioList[j].aiocbp-E<gt>aio_buf = malloc(BUF_SIZE);\n"
1393 " if (ioList[j].aiocbp-E<gt>aio_buf == NULL)\n"
1394 " errExit(\"malloc\");\n"
1395 "\\&\n"
1396 " ioList[j].aiocbp-E<gt>aio_nbytes = BUF_SIZE;\n"
1397 " ioList[j].aiocbp-E<gt>aio_reqprio = 0;\n"
1398 " ioList[j].aiocbp-E<gt>aio_offset = 0;\n"
1399 " ioList[j].aiocbp-E<gt>aio_sigevent.sigev_notify = SIGEV_SIGNAL;\n"
1400 " ioList[j].aiocbp-E<gt>aio_sigevent.sigev_signo = IO_SIGNAL;\n"
1401 " ioList[j].aiocbp-E<gt>aio_sigevent.sigev_value.sival_ptr =\n"
1402 " &ioList[j];\n"
1403 "\\&\n"
1404 " s = aio_read(ioList[j].aiocbp);\n"
1405 " if (s == -1)\n"
1406 " errExit(\"aio_read\");\n"
1407 " }\n"
1408 "\\&\n"
1409 " openReqs = numReqs;\n"
1410 "\\&\n"
1411 " /* Loop, monitoring status of I/O requests. */\n"
1412 "\\&\n"
1413 " while (openReqs E<gt> 0) {\n"
1414 " sleep(3); /* Delay between each monitoring step */\n"
1415 "\\&\n"
1416 " if (gotSIGQUIT) {\n"
1417 "\\&\n"
1418 " /* On receipt of SIGQUIT, attempt to cancel each of the\n"
1419 " outstanding I/O requests, and display status returned\n"
1420 " from the cancelation requests. */\n"
1421 "\\&\n"
1422 " printf(\"got SIGQUIT; canceling I/O requests: \\[rs]n\");\n"
1423 "\\&\n"
1424 " for (size_t j = 0; j E<lt> numReqs; j++) {\n"
1425 " if (ioList[j].status == EINPROGRESS) {\n"
1426 " printf(\" Request %zu on descriptor %d:\", j,\n"
1427 " ioList[j].aiocbp-E<gt>aio_fildes);\n"
1428 " s = aio_cancel(ioList[j].aiocbp-E<gt>aio_fildes,\n"
1429 " ioList[j].aiocbp);\n"
1430 " if (s == AIO_CANCELED)\n"
1431 " printf(\"I/O canceled\\[rs]n\");\n"
1432 " else if (s == AIO_NOTCANCELED)\n"
1433 " printf(\"I/O not canceled\\[rs]n\");\n"
1434 " else if (s == AIO_ALLDONE)\n"
1435 " printf(\"I/O all done\\[rs]n\");\n"
1436 " else\n"
1437 " perror(\"aio_cancel\");\n"
1438 " }\n"
1439 " }\n"
1440 "\\&\n"
1441 " gotSIGQUIT = 0;\n"
1442 " }\n"
1443 "\\&\n"
1444 " /* Check the status of each I/O request that is still\n"
1445 " in progress. */\n"
1446 "\\&\n"
1447 " printf(\"aio_error():\\[rs]n\");\n"
1448 " for (size_t j = 0; j E<lt> numReqs; j++) {\n"
1449 " if (ioList[j].status == EINPROGRESS) {\n"
1450 " printf(\" for request %zu (descriptor %d): \",\n"
1451 " j, ioList[j].aiocbp-E<gt>aio_fildes);\n"
1452 " ioList[j].status = aio_error(ioList[j].aiocbp);\n"
1453 "\\&\n"
1454 " switch (ioList[j].status) {\n"
1455 " case 0:\n"
1456 " printf(\"I/O succeeded\\[rs]n\");\n"
1457 " break;\n"
1458 " case EINPROGRESS:\n"
1459 " printf(\"In progress\\[rs]n\");\n"
1460 " break;\n"
1461 " case ECANCELED:\n"
1462 " printf(\"Canceled\\[rs]n\");\n"
1463 " break;\n"
1464 " default:\n"
1465 " perror(\"aio_error\");\n"
1466 " break;\n"
1467 " }\n"
1468 "\\&\n"
1469 " if (ioList[j].status != EINPROGRESS)\n"
1470 " openReqs--;\n"
1471 " }\n"
1472 " }\n"
1473 " }\n"
1474 "\\&\n"
1475 " printf(\"All I/O requests completed\\[rs]n\");\n"
1476 "\\&\n"
1477 " /* Check status return of all I/O requests. */\n"
1478 "\\&\n"
1479 " printf(\"aio_return():\\[rs]n\");\n"
1480 " for (size_t j = 0; j E<lt> numReqs; j++) {\n"
1481 " ssize_t s;\n"
1482 "\\&\n"
1483 " s = aio_return(ioList[j].aiocbp);\n"
1484 " printf(\" for request %zu (descriptor %d): %zd\\[rs]n\",\n"
1485 " j, ioList[j].aiocbp-E<gt>aio_fildes, s);\n"
1486 " }\n"
1487 "\\&\n"
1488 " exit(EXIT_SUCCESS);\n"
1489 "}\n"
1490
1491 #. type: Plain text
1492 #: debian-trixie fedora-44 fedora-rawhide
1493 msgid ""
1494 "\"Asynchronous I/O Support in Linux 2.5\", Bhattacharya, Pratt, Pulavarty, "
1495 "and Morgan, Proceedings of the Linux Symposium, 2003, E<.UR https://www."
1496 "kernel.org/doc/ols/2003/ols2003-pages-351-366.pdf> E<.UE>"
1497 msgstr ""
1498 "”دعم عمليات الإدخال/الإخراج غير المتزامنة في لينكس 2.5“، باتشاريا، برات، "
1499 "بولافارتي، ومورغان، وقائع ندوة لينكس، 2003، E<.UR https://www.kernel.org/doc/"
1500 "ols/2003/ols2003-pages-351-366.pdf> E<.UE>"
1501
1502 #. type: TH
1503 #: fedora-44 fedora-rawhide
1504 #, no-wrap
1505 msgid "Linux man-pages 6.13"
1506 msgstr "صفحات دليل لينكس 6.13"
1507
1508 #. type: TH
1509 #: mageia-cauldron
1510 #, no-wrap
1511 msgid "Linux man-pages 6.17"
1512 msgstr "صفحات دليل لينكس 6.17"
1513
1514 #. type: TH
1515 #: opensuse-leap-16-1 opensuse-tumbleweed
1516 #, no-wrap
1517 msgid "Linux man-pages (unreleased)"
1518 msgstr "صفحات دليل لينكس (لم تصدر بعد)"