tinygrad 0.8.0__py3-none-any.whl → 0.9.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. tinygrad/__init__.py +6 -6
  2. tinygrad/codegen/__init__.py +0 -0
  3. tinygrad/codegen/kernel.py +253 -225
  4. tinygrad/codegen/linearizer.py +398 -436
  5. tinygrad/codegen/uops.py +451 -0
  6. tinygrad/device.py +268 -274
  7. tinygrad/dtype.py +56 -40
  8. tinygrad/engine/__init__.py +0 -0
  9. tinygrad/engine/graph.py +100 -0
  10. tinygrad/engine/jit.py +198 -0
  11. tinygrad/engine/realize.py +192 -0
  12. tinygrad/engine/schedule.py +370 -0
  13. tinygrad/engine/search.py +199 -0
  14. tinygrad/{mlops.py → function.py} +40 -32
  15. tinygrad/helpers.py +144 -46
  16. tinygrad/lazy.py +143 -242
  17. tinygrad/multi.py +173 -0
  18. tinygrad/nn/__init__.py +180 -9
  19. tinygrad/nn/datasets.py +8 -0
  20. tinygrad/nn/optim.py +106 -28
  21. tinygrad/nn/state.py +87 -19
  22. tinygrad/ops.py +104 -45
  23. tinygrad/renderer/__init__.py +65 -0
  24. tinygrad/renderer/assembly.py +269 -0
  25. tinygrad/renderer/cstyle.py +308 -210
  26. tinygrad/renderer/llvmir.py +119 -124
  27. tinygrad/runtime/__init__.py +0 -0
  28. tinygrad/runtime/autogen/amd_gpu.py +13403 -0
  29. tinygrad/runtime/autogen/comgr.py +891 -0
  30. tinygrad/runtime/autogen/cuda.py +5923 -0
  31. tinygrad/runtime/autogen/hip.py +5909 -0
  32. tinygrad/runtime/autogen/hsa.py +5893 -0
  33. tinygrad/runtime/autogen/io_uring.py +1486 -0
  34. tinygrad/runtime/autogen/kfd.py +812 -0
  35. tinygrad/runtime/autogen/nv_gpu.py +33597 -0
  36. tinygrad/runtime/autogen/opencl.py +1795 -0
  37. tinygrad/runtime/driver/__init__.py +0 -0
  38. tinygrad/runtime/driver/hip_comgr.py +56 -0
  39. tinygrad/runtime/graph/__init__.py +0 -0
  40. tinygrad/runtime/graph/clang.py +39 -0
  41. tinygrad/runtime/graph/cuda.py +59 -54
  42. tinygrad/runtime/graph/hcq.py +187 -0
  43. tinygrad/runtime/graph/metal.py +37 -41
  44. tinygrad/runtime/ops_amd.py +550 -0
  45. tinygrad/runtime/ops_clang.py +16 -14
  46. tinygrad/runtime/ops_cuda.py +129 -37
  47. tinygrad/runtime/ops_disk.py +111 -43
  48. tinygrad/runtime/ops_gpu.py +52 -50
  49. tinygrad/runtime/ops_llvm.py +36 -56
  50. tinygrad/runtime/ops_metal.py +41 -24
  51. tinygrad/runtime/ops_npy.py +9 -0
  52. tinygrad/runtime/ops_nv.py +625 -0
  53. tinygrad/runtime/ops_python.py +208 -0
  54. tinygrad/shape/__init__.py +0 -0
  55. tinygrad/shape/shapetracker.py +46 -107
  56. tinygrad/shape/symbolic.py +99 -98
  57. tinygrad/shape/view.py +162 -45
  58. tinygrad/tensor.py +2492 -483
  59. {tinygrad-0.8.0.dist-info → tinygrad-0.9.1.dist-info}/LICENSE +1 -1
  60. {tinygrad-0.8.0.dist-info → tinygrad-0.9.1.dist-info}/METADATA +31 -13
  61. tinygrad-0.9.1.dist-info/RECORD +63 -0
  62. {tinygrad-0.8.0.dist-info → tinygrad-0.9.1.dist-info}/WHEEL +1 -1
  63. tinygrad/features/image.py +0 -93
  64. tinygrad/features/multi.py +0 -103
  65. tinygrad/features/search.py +0 -160
  66. tinygrad/graph.py +0 -106
  67. tinygrad/jit.py +0 -152
  68. tinygrad/realize.py +0 -50
  69. tinygrad/runtime/graph/hip.py +0 -24
  70. tinygrad/runtime/ops_cpu.py +0 -45
  71. tinygrad/runtime/ops_hip.py +0 -97
  72. tinygrad/runtime/ops_torch.py +0 -49
  73. tinygrad-0.8.0.dist-info/RECORD +0 -41
  74. {tinygrad-0.8.0.dist-info → tinygrad-0.9.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,1486 @@
1
+ # mypy: ignore-errors
2
+ # -*- coding: utf-8 -*-
3
+ #
4
+ # TARGET arch is: []
5
+ # WORD_SIZE is: 8
6
+ # POINTER_SIZE is: 8
7
+ # LONGDOUBLE_SIZE is: 16
8
+ #
9
+ import ctypes
10
+
11
+
12
+ class AsDictMixin:
13
+ @classmethod
14
+ def as_dict(cls, self):
15
+ result = {}
16
+ if not isinstance(self, AsDictMixin):
17
+ # not a structure, assume it's already a python object
18
+ return self
19
+ if not hasattr(cls, "_fields_"):
20
+ return result
21
+ # sys.version_info >= (3, 5)
22
+ # for (field, *_) in cls._fields_: # noqa
23
+ for field_tuple in cls._fields_: # noqa
24
+ field = field_tuple[0]
25
+ if field.startswith('PADDING_'):
26
+ continue
27
+ value = getattr(self, field)
28
+ type_ = type(value)
29
+ if hasattr(value, "_length_") and hasattr(value, "_type_"):
30
+ # array
31
+ if not hasattr(type_, "as_dict"):
32
+ value = [v for v in value]
33
+ else:
34
+ type_ = type_._type_
35
+ value = [type_.as_dict(v) for v in value]
36
+ elif hasattr(value, "contents") and hasattr(value, "_type_"):
37
+ # pointer
38
+ try:
39
+ if not hasattr(type_, "as_dict"):
40
+ value = value.contents
41
+ else:
42
+ type_ = type_._type_
43
+ value = type_.as_dict(value.contents)
44
+ except ValueError:
45
+ # nullptr
46
+ value = None
47
+ elif isinstance(value, AsDictMixin):
48
+ # other structure
49
+ value = type_.as_dict(value)
50
+ result[field] = value
51
+ return result
52
+
53
+
54
+ class Structure(ctypes.Structure, AsDictMixin):
55
+
56
+ def __init__(self, *args, **kwds):
57
+ # We don't want to use positional arguments fill PADDING_* fields
58
+
59
+ args = dict(zip(self.__class__._field_names_(), args))
60
+ args.update(kwds)
61
+ super(Structure, self).__init__(**args)
62
+
63
+ @classmethod
64
+ def _field_names_(cls):
65
+ if hasattr(cls, '_fields_'):
66
+ return (f[0] for f in cls._fields_ if not f[0].startswith('PADDING'))
67
+ else:
68
+ return ()
69
+
70
+ @classmethod
71
+ def get_type(cls, field):
72
+ for f in cls._fields_:
73
+ if f[0] == field:
74
+ return f[1]
75
+ return None
76
+
77
+ @classmethod
78
+ def bind(cls, bound_fields):
79
+ fields = {}
80
+ for name, type_ in cls._fields_:
81
+ if hasattr(type_, "restype"):
82
+ if name in bound_fields:
83
+ if bound_fields[name] is None:
84
+ fields[name] = type_()
85
+ else:
86
+ # use a closure to capture the callback from the loop scope
87
+ fields[name] = (
88
+ type_((lambda callback: lambda *args: callback(*args))(
89
+ bound_fields[name]))
90
+ )
91
+ del bound_fields[name]
92
+ else:
93
+ # default callback implementation (does nothing)
94
+ try:
95
+ default_ = type_(0).restype().value
96
+ except TypeError:
97
+ default_ = None
98
+ fields[name] = type_((
99
+ lambda default_: lambda *args: default_)(default_))
100
+ else:
101
+ # not a callback function, use default initialization
102
+ if name in bound_fields:
103
+ fields[name] = bound_fields[name]
104
+ del bound_fields[name]
105
+ else:
106
+ fields[name] = type_()
107
+ if len(bound_fields) != 0:
108
+ raise ValueError(
109
+ "Cannot bind the following unknown callback(s) {}.{}".format(
110
+ cls.__name__, bound_fields.keys()
111
+ ))
112
+ return cls(**fields)
113
+
114
+
115
+ class Union(ctypes.Union, AsDictMixin):
116
+ pass
117
+
118
+
119
+
120
+ c_int128 = ctypes.c_ubyte*16
121
+ c_uint128 = c_int128
122
+ void = None
123
+ if ctypes.sizeof(ctypes.c_longdouble) == 16:
124
+ c_long_double_t = ctypes.c_longdouble
125
+ else:
126
+ c_long_double_t = ctypes.c_ubyte*16
127
+
128
+ class FunctionFactoryStub:
129
+ def __getattr__(self, _):
130
+ return ctypes.CFUNCTYPE(lambda y:y)
131
+
132
+ # libraries['FIXME_STUB'] explanation
133
+ # As you did not list (-l libraryname.so) a library that exports this function
134
+ # This is a non-working stub instead.
135
+ # You can either re-run clan2py with -l /path/to/library.so
136
+ # Or manually fix this by comment the ctypes.CDLL loading
137
+ _libraries = {}
138
+ _libraries['FIXME_STUB'] = FunctionFactoryStub() # ctypes.CDLL('FIXME_STUB')
139
+ def string_cast(char_pointer, encoding='utf-8', errors='strict'):
140
+ value = ctypes.cast(char_pointer, ctypes.c_char_p).value
141
+ if value is not None and encoding is not None:
142
+ value = value.decode(encoding, errors=errors)
143
+ return value
144
+
145
+
146
+ def char_pointer_cast(string, encoding='utf-8'):
147
+ if encoding is not None:
148
+ try:
149
+ string = string.encode(encoding)
150
+ except AttributeError:
151
+ # In Python3, bytes has no encode attribute
152
+ pass
153
+ string = ctypes.c_char_p(string)
154
+ return ctypes.cast(string, ctypes.POINTER(ctypes.c_char))
155
+
156
+
157
+
158
+
159
+
160
+ class struct_io_uring_sq(Structure):
161
+ pass
162
+
163
+ class struct_io_uring_sqe(Structure):
164
+ pass
165
+
166
+ struct_io_uring_sq._pack_ = 1 # source:False
167
+ struct_io_uring_sq._fields_ = [
168
+ ('khead', ctypes.POINTER(ctypes.c_uint32)),
169
+ ('ktail', ctypes.POINTER(ctypes.c_uint32)),
170
+ ('kring_mask', ctypes.POINTER(ctypes.c_uint32)),
171
+ ('kring_entries', ctypes.POINTER(ctypes.c_uint32)),
172
+ ('kflags', ctypes.POINTER(ctypes.c_uint32)),
173
+ ('kdropped', ctypes.POINTER(ctypes.c_uint32)),
174
+ ('array', ctypes.POINTER(ctypes.c_uint32)),
175
+ ('sqes', ctypes.POINTER(struct_io_uring_sqe)),
176
+ ('sqe_head', ctypes.c_uint32),
177
+ ('sqe_tail', ctypes.c_uint32),
178
+ ('ring_sz', ctypes.c_uint64),
179
+ ('ring_ptr', ctypes.POINTER(None)),
180
+ ('pad', ctypes.c_uint32 * 4),
181
+ ]
182
+
183
+ class union_io_uring_sqe_0(Union):
184
+ pass
185
+
186
+ union_io_uring_sqe_0._pack_ = 1 # source:False
187
+ union_io_uring_sqe_0._fields_ = [
188
+ ('off', ctypes.c_uint64),
189
+ ('addr2', ctypes.c_uint64),
190
+ ]
191
+
192
+ class union_io_uring_sqe_1(Union):
193
+ pass
194
+
195
+ union_io_uring_sqe_1._pack_ = 1 # source:False
196
+ union_io_uring_sqe_1._fields_ = [
197
+ ('addr', ctypes.c_uint64),
198
+ ('splice_off_in', ctypes.c_uint64),
199
+ ]
200
+
201
+ class union_io_uring_sqe_2(Union):
202
+ pass
203
+
204
+ union_io_uring_sqe_2._pack_ = 1 # source:False
205
+ union_io_uring_sqe_2._fields_ = [
206
+ ('rw_flags', ctypes.c_int32),
207
+ ('fsync_flags', ctypes.c_uint32),
208
+ ('poll_events', ctypes.c_uint16),
209
+ ('poll32_events', ctypes.c_uint32),
210
+ ('sync_range_flags', ctypes.c_uint32),
211
+ ('msg_flags', ctypes.c_uint32),
212
+ ('timeout_flags', ctypes.c_uint32),
213
+ ('accept_flags', ctypes.c_uint32),
214
+ ('cancel_flags', ctypes.c_uint32),
215
+ ('open_flags', ctypes.c_uint32),
216
+ ('statx_flags', ctypes.c_uint32),
217
+ ('fadvise_advice', ctypes.c_uint32),
218
+ ('splice_flags', ctypes.c_uint32),
219
+ ('rename_flags', ctypes.c_uint32),
220
+ ('unlink_flags', ctypes.c_uint32),
221
+ ('hardlink_flags', ctypes.c_uint32),
222
+ ]
223
+
224
+ class union_io_uring_sqe_3(Union):
225
+ pass
226
+
227
+ union_io_uring_sqe_3._pack_ = 1 # source:True
228
+ union_io_uring_sqe_3._fields_ = [
229
+ ('buf_index', ctypes.c_uint16),
230
+ ('buf_group', ctypes.c_uint16),
231
+ ]
232
+
233
+ class union_io_uring_sqe_4(Union):
234
+ pass
235
+
236
+ union_io_uring_sqe_4._pack_ = 1 # source:False
237
+ union_io_uring_sqe_4._fields_ = [
238
+ ('splice_fd_in', ctypes.c_int32),
239
+ ('file_index', ctypes.c_uint32),
240
+ ]
241
+
242
+ struct_io_uring_sqe._pack_ = 1 # source:False
243
+ struct_io_uring_sqe._anonymous_ = ('_0', '_1', '_2', '_3', '_4',)
244
+ struct_io_uring_sqe._fields_ = [
245
+ ('opcode', ctypes.c_ubyte),
246
+ ('flags', ctypes.c_ubyte),
247
+ ('ioprio', ctypes.c_uint16),
248
+ ('fd', ctypes.c_int32),
249
+ ('_0', union_io_uring_sqe_0),
250
+ ('_1', union_io_uring_sqe_1),
251
+ ('len', ctypes.c_uint32),
252
+ ('_2', union_io_uring_sqe_2),
253
+ ('user_data', ctypes.c_uint64),
254
+ ('_3', union_io_uring_sqe_3),
255
+ ('personality', ctypes.c_uint16),
256
+ ('_4', union_io_uring_sqe_4),
257
+ ('__pad2', ctypes.c_uint64 * 2),
258
+ ]
259
+
260
+ class struct_io_uring_cq(Structure):
261
+ pass
262
+
263
+ class struct_io_uring_cqe(Structure):
264
+ pass
265
+
266
+ struct_io_uring_cq._pack_ = 1 # source:False
267
+ struct_io_uring_cq._fields_ = [
268
+ ('khead', ctypes.POINTER(ctypes.c_uint32)),
269
+ ('ktail', ctypes.POINTER(ctypes.c_uint32)),
270
+ ('kring_mask', ctypes.POINTER(ctypes.c_uint32)),
271
+ ('kring_entries', ctypes.POINTER(ctypes.c_uint32)),
272
+ ('kflags', ctypes.POINTER(ctypes.c_uint32)),
273
+ ('koverflow', ctypes.POINTER(ctypes.c_uint32)),
274
+ ('cqes', ctypes.POINTER(struct_io_uring_cqe)),
275
+ ('ring_sz', ctypes.c_uint64),
276
+ ('ring_ptr', ctypes.POINTER(None)),
277
+ ('pad', ctypes.c_uint32 * 4),
278
+ ]
279
+
280
+ struct_io_uring_cqe._pack_ = 1 # source:False
281
+ struct_io_uring_cqe._fields_ = [
282
+ ('user_data', ctypes.c_uint64),
283
+ ('res', ctypes.c_int32),
284
+ ('flags', ctypes.c_uint32),
285
+ ]
286
+
287
+ class struct_io_uring(Structure):
288
+ pass
289
+
290
+ struct_io_uring._pack_ = 1 # source:False
291
+ struct_io_uring._fields_ = [
292
+ ('sq', struct_io_uring_sq),
293
+ ('cq', struct_io_uring_cq),
294
+ ('flags', ctypes.c_uint32),
295
+ ('ring_fd', ctypes.c_int32),
296
+ ('features', ctypes.c_uint32),
297
+ ('pad', ctypes.c_uint32 * 3),
298
+ ]
299
+
300
+ class struct_io_uring_probe(Structure):
301
+ pass
302
+
303
+ class struct_io_uring_probe_op(Structure):
304
+ pass
305
+
306
+ struct_io_uring_probe_op._pack_ = 1 # source:False
307
+ struct_io_uring_probe_op._fields_ = [
308
+ ('op', ctypes.c_ubyte),
309
+ ('resv', ctypes.c_ubyte),
310
+ ('flags', ctypes.c_uint16),
311
+ ('resv2', ctypes.c_uint32),
312
+ ]
313
+
314
+ struct_io_uring_probe._pack_ = 1 # source:False
315
+ struct_io_uring_probe._fields_ = [
316
+ ('last_op', ctypes.c_ubyte),
317
+ ('ops_len', ctypes.c_ubyte),
318
+ ('resv', ctypes.c_uint16),
319
+ ('resv2', ctypes.c_uint32 * 3),
320
+ ('ops', struct_io_uring_probe_op * 0),
321
+ ]
322
+
323
+ try:
324
+ io_uring_get_probe_ring = _libraries['FIXME_STUB'].io_uring_get_probe_ring
325
+ io_uring_get_probe_ring.restype = ctypes.POINTER(struct_io_uring_probe)
326
+ io_uring_get_probe_ring.argtypes = [ctypes.POINTER(struct_io_uring)]
327
+ except AttributeError:
328
+ pass
329
+ try:
330
+ io_uring_get_probe = _libraries['FIXME_STUB'].io_uring_get_probe
331
+ io_uring_get_probe.restype = ctypes.POINTER(struct_io_uring_probe)
332
+ io_uring_get_probe.argtypes = []
333
+ except AttributeError:
334
+ pass
335
+ try:
336
+ io_uring_free_probe = _libraries['FIXME_STUB'].io_uring_free_probe
337
+ io_uring_free_probe.restype = None
338
+ io_uring_free_probe.argtypes = [ctypes.POINTER(struct_io_uring_probe)]
339
+ except AttributeError:
340
+ pass
341
+ try:
342
+ io_uring_opcode_supported = _libraries['FIXME_STUB'].io_uring_opcode_supported
343
+ io_uring_opcode_supported.restype = ctypes.c_int32
344
+ io_uring_opcode_supported.argtypes = [ctypes.POINTER(struct_io_uring_probe), ctypes.c_int32]
345
+ except AttributeError:
346
+ pass
347
+ class struct_io_uring_params(Structure):
348
+ pass
349
+
350
+ class struct_io_sqring_offsets(Structure):
351
+ pass
352
+
353
+ struct_io_sqring_offsets._pack_ = 1 # source:False
354
+ struct_io_sqring_offsets._fields_ = [
355
+ ('head', ctypes.c_uint32),
356
+ ('tail', ctypes.c_uint32),
357
+ ('ring_mask', ctypes.c_uint32),
358
+ ('ring_entries', ctypes.c_uint32),
359
+ ('flags', ctypes.c_uint32),
360
+ ('dropped', ctypes.c_uint32),
361
+ ('array', ctypes.c_uint32),
362
+ ('resv1', ctypes.c_uint32),
363
+ ('resv2', ctypes.c_uint64),
364
+ ]
365
+
366
+ class struct_io_cqring_offsets(Structure):
367
+ pass
368
+
369
+ struct_io_cqring_offsets._pack_ = 1 # source:False
370
+ struct_io_cqring_offsets._fields_ = [
371
+ ('head', ctypes.c_uint32),
372
+ ('tail', ctypes.c_uint32),
373
+ ('ring_mask', ctypes.c_uint32),
374
+ ('ring_entries', ctypes.c_uint32),
375
+ ('overflow', ctypes.c_uint32),
376
+ ('cqes', ctypes.c_uint32),
377
+ ('flags', ctypes.c_uint32),
378
+ ('resv1', ctypes.c_uint32),
379
+ ('resv2', ctypes.c_uint64),
380
+ ]
381
+
382
+ struct_io_uring_params._pack_ = 1 # source:False
383
+ struct_io_uring_params._fields_ = [
384
+ ('sq_entries', ctypes.c_uint32),
385
+ ('cq_entries', ctypes.c_uint32),
386
+ ('flags', ctypes.c_uint32),
387
+ ('sq_thread_cpu', ctypes.c_uint32),
388
+ ('sq_thread_idle', ctypes.c_uint32),
389
+ ('features', ctypes.c_uint32),
390
+ ('wq_fd', ctypes.c_uint32),
391
+ ('resv', ctypes.c_uint32 * 3),
392
+ ('sq_off', struct_io_sqring_offsets),
393
+ ('cq_off', struct_io_cqring_offsets),
394
+ ]
395
+
396
+ try:
397
+ io_uring_queue_init_params = _libraries['FIXME_STUB'].io_uring_queue_init_params
398
+ io_uring_queue_init_params.restype = ctypes.c_int32
399
+ io_uring_queue_init_params.argtypes = [ctypes.c_uint32, ctypes.POINTER(struct_io_uring), ctypes.POINTER(struct_io_uring_params)]
400
+ except AttributeError:
401
+ pass
402
+ try:
403
+ io_uring_queue_init = _libraries['FIXME_STUB'].io_uring_queue_init
404
+ io_uring_queue_init.restype = ctypes.c_int32
405
+ io_uring_queue_init.argtypes = [ctypes.c_uint32, ctypes.POINTER(struct_io_uring), ctypes.c_uint32]
406
+ except AttributeError:
407
+ pass
408
+ try:
409
+ io_uring_queue_mmap = _libraries['FIXME_STUB'].io_uring_queue_mmap
410
+ io_uring_queue_mmap.restype = ctypes.c_int32
411
+ io_uring_queue_mmap.argtypes = [ctypes.c_int32, ctypes.POINTER(struct_io_uring_params), ctypes.POINTER(struct_io_uring)]
412
+ except AttributeError:
413
+ pass
414
+ try:
415
+ io_uring_ring_dontfork = _libraries['FIXME_STUB'].io_uring_ring_dontfork
416
+ io_uring_ring_dontfork.restype = ctypes.c_int32
417
+ io_uring_ring_dontfork.argtypes = [ctypes.POINTER(struct_io_uring)]
418
+ except AttributeError:
419
+ pass
420
+ try:
421
+ io_uring_queue_exit = _libraries['FIXME_STUB'].io_uring_queue_exit
422
+ io_uring_queue_exit.restype = None
423
+ io_uring_queue_exit.argtypes = [ctypes.POINTER(struct_io_uring)]
424
+ except AttributeError:
425
+ pass
426
+ try:
427
+ io_uring_peek_batch_cqe = _libraries['FIXME_STUB'].io_uring_peek_batch_cqe
428
+ io_uring_peek_batch_cqe.restype = ctypes.c_uint32
429
+ io_uring_peek_batch_cqe.argtypes = [ctypes.POINTER(struct_io_uring), ctypes.POINTER(ctypes.POINTER(struct_io_uring_cqe)), ctypes.c_uint32]
430
+ except AttributeError:
431
+ pass
432
+ class struct___kernel_timespec(Structure):
433
+ pass
434
+
435
+ struct___kernel_timespec._pack_ = 1 # source:False
436
+ struct___kernel_timespec._fields_ = [
437
+ ('tv_sec', ctypes.c_int64),
438
+ ('tv_nsec', ctypes.c_int64),
439
+ ]
440
+
441
+ class struct_c__SA___sigset_t(Structure):
442
+ pass
443
+
444
+ struct_c__SA___sigset_t._pack_ = 1 # source:False
445
+ struct_c__SA___sigset_t._fields_ = [
446
+ ('__val', ctypes.c_uint64 * 16),
447
+ ]
448
+
449
+ try:
450
+ io_uring_wait_cqes = _libraries['FIXME_STUB'].io_uring_wait_cqes
451
+ io_uring_wait_cqes.restype = ctypes.c_int32
452
+ io_uring_wait_cqes.argtypes = [ctypes.POINTER(struct_io_uring), ctypes.POINTER(ctypes.POINTER(struct_io_uring_cqe)), ctypes.c_uint32, ctypes.POINTER(struct___kernel_timespec), ctypes.POINTER(struct_c__SA___sigset_t)]
453
+ except AttributeError:
454
+ pass
455
+ try:
456
+ io_uring_wait_cqe_timeout = _libraries['FIXME_STUB'].io_uring_wait_cqe_timeout
457
+ io_uring_wait_cqe_timeout.restype = ctypes.c_int32
458
+ io_uring_wait_cqe_timeout.argtypes = [ctypes.POINTER(struct_io_uring), ctypes.POINTER(ctypes.POINTER(struct_io_uring_cqe)), ctypes.POINTER(struct___kernel_timespec)]
459
+ except AttributeError:
460
+ pass
461
+ try:
462
+ io_uring_submit = _libraries['FIXME_STUB'].io_uring_submit
463
+ io_uring_submit.restype = ctypes.c_int32
464
+ io_uring_submit.argtypes = [ctypes.POINTER(struct_io_uring)]
465
+ except AttributeError:
466
+ pass
467
+ try:
468
+ io_uring_submit_and_wait = _libraries['FIXME_STUB'].io_uring_submit_and_wait
469
+ io_uring_submit_and_wait.restype = ctypes.c_int32
470
+ io_uring_submit_and_wait.argtypes = [ctypes.POINTER(struct_io_uring), ctypes.c_uint32]
471
+ except AttributeError:
472
+ pass
473
+ try:
474
+ io_uring_get_sqe = _libraries['FIXME_STUB'].io_uring_get_sqe
475
+ io_uring_get_sqe.restype = ctypes.POINTER(struct_io_uring_sqe)
476
+ io_uring_get_sqe.argtypes = [ctypes.POINTER(struct_io_uring)]
477
+ except AttributeError:
478
+ pass
479
+ class struct_iovec(Structure):
480
+ pass
481
+
482
+ struct_iovec._pack_ = 1 # source:False
483
+ struct_iovec._fields_ = [
484
+ ('iov_base', ctypes.POINTER(None)),
485
+ ('iov_len', ctypes.c_uint64),
486
+ ]
487
+
488
+ try:
489
+ io_uring_register_buffers = _libraries['FIXME_STUB'].io_uring_register_buffers
490
+ io_uring_register_buffers.restype = ctypes.c_int32
491
+ io_uring_register_buffers.argtypes = [ctypes.POINTER(struct_io_uring), ctypes.POINTER(struct_iovec), ctypes.c_uint32]
492
+ except AttributeError:
493
+ pass
494
+ try:
495
+ io_uring_register_buffers_tags = _libraries['FIXME_STUB'].io_uring_register_buffers_tags
496
+ io_uring_register_buffers_tags.restype = ctypes.c_int32
497
+ io_uring_register_buffers_tags.argtypes = [ctypes.POINTER(struct_io_uring), ctypes.POINTER(struct_iovec), ctypes.POINTER(ctypes.c_uint64), ctypes.c_uint32]
498
+ except AttributeError:
499
+ pass
500
+ try:
501
+ io_uring_register_buffers_update_tag = _libraries['FIXME_STUB'].io_uring_register_buffers_update_tag
502
+ io_uring_register_buffers_update_tag.restype = ctypes.c_int32
503
+ io_uring_register_buffers_update_tag.argtypes = [ctypes.POINTER(struct_io_uring), ctypes.c_uint32, ctypes.POINTER(struct_iovec), ctypes.POINTER(ctypes.c_uint64), ctypes.c_uint32]
504
+ except AttributeError:
505
+ pass
506
+ try:
507
+ io_uring_unregister_buffers = _libraries['FIXME_STUB'].io_uring_unregister_buffers
508
+ io_uring_unregister_buffers.restype = ctypes.c_int32
509
+ io_uring_unregister_buffers.argtypes = [ctypes.POINTER(struct_io_uring)]
510
+ except AttributeError:
511
+ pass
512
+ try:
513
+ io_uring_register_files = _libraries['FIXME_STUB'].io_uring_register_files
514
+ io_uring_register_files.restype = ctypes.c_int32
515
+ io_uring_register_files.argtypes = [ctypes.POINTER(struct_io_uring), ctypes.POINTER(ctypes.c_int32), ctypes.c_uint32]
516
+ except AttributeError:
517
+ pass
518
+ try:
519
+ io_uring_register_files_tags = _libraries['FIXME_STUB'].io_uring_register_files_tags
520
+ io_uring_register_files_tags.restype = ctypes.c_int32
521
+ io_uring_register_files_tags.argtypes = [ctypes.POINTER(struct_io_uring), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_uint64), ctypes.c_uint32]
522
+ except AttributeError:
523
+ pass
524
+ try:
525
+ io_uring_register_files_update_tag = _libraries['FIXME_STUB'].io_uring_register_files_update_tag
526
+ io_uring_register_files_update_tag.restype = ctypes.c_int32
527
+ io_uring_register_files_update_tag.argtypes = [ctypes.POINTER(struct_io_uring), ctypes.c_uint32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_uint64), ctypes.c_uint32]
528
+ except AttributeError:
529
+ pass
530
+ try:
531
+ io_uring_unregister_files = _libraries['FIXME_STUB'].io_uring_unregister_files
532
+ io_uring_unregister_files.restype = ctypes.c_int32
533
+ io_uring_unregister_files.argtypes = [ctypes.POINTER(struct_io_uring)]
534
+ except AttributeError:
535
+ pass
536
+ try:
537
+ io_uring_register_files_update = _libraries['FIXME_STUB'].io_uring_register_files_update
538
+ io_uring_register_files_update.restype = ctypes.c_int32
539
+ io_uring_register_files_update.argtypes = [ctypes.POINTER(struct_io_uring), ctypes.c_uint32, ctypes.POINTER(ctypes.c_int32), ctypes.c_uint32]
540
+ except AttributeError:
541
+ pass
542
+ try:
543
+ io_uring_register_eventfd = _libraries['FIXME_STUB'].io_uring_register_eventfd
544
+ io_uring_register_eventfd.restype = ctypes.c_int32
545
+ io_uring_register_eventfd.argtypes = [ctypes.POINTER(struct_io_uring), ctypes.c_int32]
546
+ except AttributeError:
547
+ pass
548
+ try:
549
+ io_uring_register_eventfd_async = _libraries['FIXME_STUB'].io_uring_register_eventfd_async
550
+ io_uring_register_eventfd_async.restype = ctypes.c_int32
551
+ io_uring_register_eventfd_async.argtypes = [ctypes.POINTER(struct_io_uring), ctypes.c_int32]
552
+ except AttributeError:
553
+ pass
554
+ try:
555
+ io_uring_unregister_eventfd = _libraries['FIXME_STUB'].io_uring_unregister_eventfd
556
+ io_uring_unregister_eventfd.restype = ctypes.c_int32
557
+ io_uring_unregister_eventfd.argtypes = [ctypes.POINTER(struct_io_uring)]
558
+ except AttributeError:
559
+ pass
560
+ try:
561
+ io_uring_register_probe = _libraries['FIXME_STUB'].io_uring_register_probe
562
+ io_uring_register_probe.restype = ctypes.c_int32
563
+ io_uring_register_probe.argtypes = [ctypes.POINTER(struct_io_uring), ctypes.POINTER(struct_io_uring_probe), ctypes.c_uint32]
564
+ except AttributeError:
565
+ pass
566
+ try:
567
+ io_uring_register_personality = _libraries['FIXME_STUB'].io_uring_register_personality
568
+ io_uring_register_personality.restype = ctypes.c_int32
569
+ io_uring_register_personality.argtypes = [ctypes.POINTER(struct_io_uring)]
570
+ except AttributeError:
571
+ pass
572
+ try:
573
+ io_uring_unregister_personality = _libraries['FIXME_STUB'].io_uring_unregister_personality
574
+ io_uring_unregister_personality.restype = ctypes.c_int32
575
+ io_uring_unregister_personality.argtypes = [ctypes.POINTER(struct_io_uring), ctypes.c_int32]
576
+ except AttributeError:
577
+ pass
578
+ class struct_io_uring_restriction(Structure):
579
+ pass
580
+
581
+ class union_io_uring_restriction_0(Union):
582
+ pass
583
+
584
+ union_io_uring_restriction_0._pack_ = 1 # source:False
585
+ union_io_uring_restriction_0._fields_ = [
586
+ ('register_op', ctypes.c_ubyte),
587
+ ('sqe_op', ctypes.c_ubyte),
588
+ ('sqe_flags', ctypes.c_ubyte),
589
+ ]
590
+
591
+ struct_io_uring_restriction._pack_ = 1 # source:False
592
+ struct_io_uring_restriction._anonymous_ = ('_0',)
593
+ struct_io_uring_restriction._fields_ = [
594
+ ('opcode', ctypes.c_uint16),
595
+ ('_0', union_io_uring_restriction_0),
596
+ ('resv', ctypes.c_ubyte),
597
+ ('resv2', ctypes.c_uint32 * 3),
598
+ ]
599
+
600
+ try:
601
+ io_uring_register_restrictions = _libraries['FIXME_STUB'].io_uring_register_restrictions
602
+ io_uring_register_restrictions.restype = ctypes.c_int32
603
+ io_uring_register_restrictions.argtypes = [ctypes.POINTER(struct_io_uring), ctypes.POINTER(struct_io_uring_restriction), ctypes.c_uint32]
604
+ except AttributeError:
605
+ pass
606
+ try:
607
+ io_uring_enable_rings = _libraries['FIXME_STUB'].io_uring_enable_rings
608
+ io_uring_enable_rings.restype = ctypes.c_int32
609
+ io_uring_enable_rings.argtypes = [ctypes.POINTER(struct_io_uring)]
610
+ except AttributeError:
611
+ pass
612
+ try:
613
+ __io_uring_sqring_wait = _libraries['FIXME_STUB'].__io_uring_sqring_wait
614
+ __io_uring_sqring_wait.restype = ctypes.c_int32
615
+ __io_uring_sqring_wait.argtypes = [ctypes.POINTER(struct_io_uring)]
616
+ except AttributeError:
617
+ pass
618
+ size_t = ctypes.c_uint64
619
+ class struct_c__SA_cpu_set_t(Structure):
620
+ pass
621
+
622
+ struct_c__SA_cpu_set_t._pack_ = 1 # source:False
623
+ struct_c__SA_cpu_set_t._fields_ = [
624
+ ('__bits', ctypes.c_uint64 * 16),
625
+ ]
626
+
627
+ try:
628
+ io_uring_register_iowq_aff = _libraries['FIXME_STUB'].io_uring_register_iowq_aff
629
+ io_uring_register_iowq_aff.restype = ctypes.c_int32
630
+ io_uring_register_iowq_aff.argtypes = [ctypes.POINTER(struct_io_uring), size_t, ctypes.POINTER(struct_c__SA_cpu_set_t)]
631
+ except AttributeError:
632
+ pass
633
+ try:
634
+ io_uring_unregister_iowq_aff = _libraries['FIXME_STUB'].io_uring_unregister_iowq_aff
635
+ io_uring_unregister_iowq_aff.restype = ctypes.c_int32
636
+ io_uring_unregister_iowq_aff.argtypes = [ctypes.POINTER(struct_io_uring)]
637
+ except AttributeError:
638
+ pass
639
+ try:
640
+ io_uring_register_iowq_max_workers = _libraries['FIXME_STUB'].io_uring_register_iowq_max_workers
641
+ io_uring_register_iowq_max_workers.restype = ctypes.c_int32
642
+ io_uring_register_iowq_max_workers.argtypes = [ctypes.POINTER(struct_io_uring), ctypes.POINTER(ctypes.c_uint32)]
643
+ except AttributeError:
644
+ pass
645
+ try:
646
+ __io_uring_get_cqe = _libraries['FIXME_STUB'].__io_uring_get_cqe
647
+ __io_uring_get_cqe.restype = ctypes.c_int32
648
+ __io_uring_get_cqe.argtypes = [ctypes.POINTER(struct_io_uring), ctypes.POINTER(ctypes.POINTER(struct_io_uring_cqe)), ctypes.c_uint32, ctypes.c_uint32, ctypes.POINTER(struct_c__SA___sigset_t)]
649
+ except AttributeError:
650
+ pass
651
+ try:
652
+ io_uring_cq_advance = _libraries['FIXME_STUB'].io_uring_cq_advance
653
+ io_uring_cq_advance.restype = None
654
+ io_uring_cq_advance.argtypes = [ctypes.POINTER(struct_io_uring), ctypes.c_uint32]
655
+ except AttributeError:
656
+ pass
657
+ try:
658
+ io_uring_cqe_seen = _libraries['FIXME_STUB'].io_uring_cqe_seen
659
+ io_uring_cqe_seen.restype = None
660
+ io_uring_cqe_seen.argtypes = [ctypes.POINTER(struct_io_uring), ctypes.POINTER(struct_io_uring_cqe)]
661
+ except AttributeError:
662
+ pass
663
+ try:
664
+ io_uring_sqe_set_data = _libraries['FIXME_STUB'].io_uring_sqe_set_data
665
+ io_uring_sqe_set_data.restype = None
666
+ io_uring_sqe_set_data.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.POINTER(None)]
667
+ except AttributeError:
668
+ pass
669
+ try:
670
+ io_uring_cqe_get_data = _libraries['FIXME_STUB'].io_uring_cqe_get_data
671
+ io_uring_cqe_get_data.restype = ctypes.POINTER(None)
672
+ io_uring_cqe_get_data.argtypes = [ctypes.POINTER(struct_io_uring_cqe)]
673
+ except AttributeError:
674
+ pass
675
+ try:
676
+ io_uring_sqe_set_flags = _libraries['FIXME_STUB'].io_uring_sqe_set_flags
677
+ io_uring_sqe_set_flags.restype = None
678
+ io_uring_sqe_set_flags.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_uint32]
679
+ except AttributeError:
680
+ pass
681
+ try:
682
+ __io_uring_set_target_fixed_file = _libraries['FIXME_STUB'].__io_uring_set_target_fixed_file
683
+ __io_uring_set_target_fixed_file.restype = None
684
+ __io_uring_set_target_fixed_file.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_uint32]
685
+ except AttributeError:
686
+ pass
687
+ __u64 = ctypes.c_uint64
688
+ try:
689
+ io_uring_prep_rw = _libraries['FIXME_STUB'].io_uring_prep_rw
690
+ io_uring_prep_rw.restype = None
691
+ io_uring_prep_rw.argtypes = [ctypes.c_int32, ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.POINTER(None), ctypes.c_uint32, __u64]
692
+ except AttributeError:
693
+ pass
694
+ int64_t = ctypes.c_int64
695
+ try:
696
+ io_uring_prep_splice = _libraries['FIXME_STUB'].io_uring_prep_splice
697
+ io_uring_prep_splice.restype = None
698
+ io_uring_prep_splice.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, int64_t, ctypes.c_int32, int64_t, ctypes.c_uint32, ctypes.c_uint32]
699
+ except AttributeError:
700
+ pass
701
+ try:
702
+ io_uring_prep_tee = _libraries['FIXME_STUB'].io_uring_prep_tee
703
+ io_uring_prep_tee.restype = None
704
+ io_uring_prep_tee.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.c_int32, ctypes.c_uint32, ctypes.c_uint32]
705
+ except AttributeError:
706
+ pass
707
+ try:
708
+ io_uring_prep_readv = _libraries['FIXME_STUB'].io_uring_prep_readv
709
+ io_uring_prep_readv.restype = None
710
+ io_uring_prep_readv.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.POINTER(struct_iovec), ctypes.c_uint32, __u64]
711
+ except AttributeError:
712
+ pass
713
+ try:
714
+ io_uring_prep_read_fixed = _libraries['FIXME_STUB'].io_uring_prep_read_fixed
715
+ io_uring_prep_read_fixed.restype = None
716
+ io_uring_prep_read_fixed.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.POINTER(None), ctypes.c_uint32, __u64, ctypes.c_int32]
717
+ except AttributeError:
718
+ pass
719
+ try:
720
+ io_uring_prep_writev = _libraries['FIXME_STUB'].io_uring_prep_writev
721
+ io_uring_prep_writev.restype = None
722
+ io_uring_prep_writev.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.POINTER(struct_iovec), ctypes.c_uint32, __u64]
723
+ except AttributeError:
724
+ pass
725
+ try:
726
+ io_uring_prep_write_fixed = _libraries['FIXME_STUB'].io_uring_prep_write_fixed
727
+ io_uring_prep_write_fixed.restype = None
728
+ io_uring_prep_write_fixed.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.POINTER(None), ctypes.c_uint32, __u64, ctypes.c_int32]
729
+ except AttributeError:
730
+ pass
731
+ class struct_msghdr(Structure):
732
+ pass
733
+
734
+ struct_msghdr._pack_ = 1 # source:False
735
+ struct_msghdr._fields_ = [
736
+ ('msg_name', ctypes.POINTER(None)),
737
+ ('msg_namelen', ctypes.c_uint32),
738
+ ('PADDING_0', ctypes.c_ubyte * 4),
739
+ ('msg_iov', ctypes.POINTER(struct_iovec)),
740
+ ('msg_iovlen', ctypes.c_uint64),
741
+ ('msg_control', ctypes.POINTER(None)),
742
+ ('msg_controllen', ctypes.c_uint64),
743
+ ('msg_flags', ctypes.c_int32),
744
+ ('PADDING_1', ctypes.c_ubyte * 4),
745
+ ]
746
+
747
+ try:
748
+ io_uring_prep_recvmsg = _libraries['FIXME_STUB'].io_uring_prep_recvmsg
749
+ io_uring_prep_recvmsg.restype = None
750
+ io_uring_prep_recvmsg.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.POINTER(struct_msghdr), ctypes.c_uint32]
751
+ except AttributeError:
752
+ pass
753
+ try:
754
+ io_uring_prep_sendmsg = _libraries['FIXME_STUB'].io_uring_prep_sendmsg
755
+ io_uring_prep_sendmsg.restype = None
756
+ io_uring_prep_sendmsg.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.POINTER(struct_msghdr), ctypes.c_uint32]
757
+ except AttributeError:
758
+ pass
759
+ try:
760
+ __io_uring_prep_poll_mask = _libraries['FIXME_STUB'].__io_uring_prep_poll_mask
761
+ __io_uring_prep_poll_mask.restype = ctypes.c_uint32
762
+ __io_uring_prep_poll_mask.argtypes = [ctypes.c_uint32]
763
+ except AttributeError:
764
+ pass
765
+ try:
766
+ io_uring_prep_poll_add = _libraries['FIXME_STUB'].io_uring_prep_poll_add
767
+ io_uring_prep_poll_add.restype = None
768
+ io_uring_prep_poll_add.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.c_uint32]
769
+ except AttributeError:
770
+ pass
771
+ try:
772
+ io_uring_prep_poll_multishot = _libraries['FIXME_STUB'].io_uring_prep_poll_multishot
773
+ io_uring_prep_poll_multishot.restype = None
774
+ io_uring_prep_poll_multishot.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.c_uint32]
775
+ except AttributeError:
776
+ pass
777
+ try:
778
+ io_uring_prep_poll_remove = _libraries['FIXME_STUB'].io_uring_prep_poll_remove
779
+ io_uring_prep_poll_remove.restype = None
780
+ io_uring_prep_poll_remove.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.POINTER(None)]
781
+ except AttributeError:
782
+ pass
783
+ try:
784
+ io_uring_prep_poll_update = _libraries['FIXME_STUB'].io_uring_prep_poll_update
785
+ io_uring_prep_poll_update.restype = None
786
+ io_uring_prep_poll_update.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.POINTER(None), ctypes.POINTER(None), ctypes.c_uint32, ctypes.c_uint32]
787
+ except AttributeError:
788
+ pass
789
+ try:
790
+ io_uring_prep_fsync = _libraries['FIXME_STUB'].io_uring_prep_fsync
791
+ io_uring_prep_fsync.restype = None
792
+ io_uring_prep_fsync.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.c_uint32]
793
+ except AttributeError:
794
+ pass
795
+ try:
796
+ io_uring_prep_nop = _libraries['FIXME_STUB'].io_uring_prep_nop
797
+ io_uring_prep_nop.restype = None
798
+ io_uring_prep_nop.argtypes = [ctypes.POINTER(struct_io_uring_sqe)]
799
+ except AttributeError:
800
+ pass
801
+ try:
802
+ io_uring_prep_timeout = _libraries['FIXME_STUB'].io_uring_prep_timeout
803
+ io_uring_prep_timeout.restype = None
804
+ io_uring_prep_timeout.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.POINTER(struct___kernel_timespec), ctypes.c_uint32, ctypes.c_uint32]
805
+ except AttributeError:
806
+ pass
807
+ try:
808
+ io_uring_prep_timeout_remove = _libraries['FIXME_STUB'].io_uring_prep_timeout_remove
809
+ io_uring_prep_timeout_remove.restype = None
810
+ io_uring_prep_timeout_remove.argtypes = [ctypes.POINTER(struct_io_uring_sqe), __u64, ctypes.c_uint32]
811
+ except AttributeError:
812
+ pass
813
+ try:
814
+ io_uring_prep_timeout_update = _libraries['FIXME_STUB'].io_uring_prep_timeout_update
815
+ io_uring_prep_timeout_update.restype = None
816
+ io_uring_prep_timeout_update.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.POINTER(struct___kernel_timespec), __u64, ctypes.c_uint32]
817
+ except AttributeError:
818
+ pass
819
+ class struct_sockaddr(Structure):
820
+ pass
821
+
822
+ struct_sockaddr._pack_ = 1 # source:False
823
+ struct_sockaddr._fields_ = [
824
+ ('sa_family', ctypes.c_uint16),
825
+ ('sa_data', ctypes.c_char * 14),
826
+ ]
827
+
828
+ try:
829
+ io_uring_prep_accept = _libraries['FIXME_STUB'].io_uring_prep_accept
830
+ io_uring_prep_accept.restype = None
831
+ io_uring_prep_accept.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.POINTER(struct_sockaddr), ctypes.POINTER(ctypes.c_uint32), ctypes.c_int32]
832
+ except AttributeError:
833
+ pass
834
+ try:
835
+ io_uring_prep_accept_direct = _libraries['FIXME_STUB'].io_uring_prep_accept_direct
836
+ io_uring_prep_accept_direct.restype = None
837
+ io_uring_prep_accept_direct.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.POINTER(struct_sockaddr), ctypes.POINTER(ctypes.c_uint32), ctypes.c_int32, ctypes.c_uint32]
838
+ except AttributeError:
839
+ pass
840
+ try:
841
+ io_uring_prep_cancel = _libraries['FIXME_STUB'].io_uring_prep_cancel
842
+ io_uring_prep_cancel.restype = None
843
+ io_uring_prep_cancel.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.POINTER(None), ctypes.c_int32]
844
+ except AttributeError:
845
+ pass
846
+ try:
847
+ io_uring_prep_link_timeout = _libraries['FIXME_STUB'].io_uring_prep_link_timeout
848
+ io_uring_prep_link_timeout.restype = None
849
+ io_uring_prep_link_timeout.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.POINTER(struct___kernel_timespec), ctypes.c_uint32]
850
+ except AttributeError:
851
+ pass
852
+ socklen_t = ctypes.c_uint32
853
+ try:
854
+ io_uring_prep_connect = _libraries['FIXME_STUB'].io_uring_prep_connect
855
+ io_uring_prep_connect.restype = None
856
+ io_uring_prep_connect.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.POINTER(struct_sockaddr), socklen_t]
857
+ except AttributeError:
858
+ pass
859
+ try:
860
+ io_uring_prep_files_update = _libraries['FIXME_STUB'].io_uring_prep_files_update
861
+ io_uring_prep_files_update.restype = None
862
+ io_uring_prep_files_update.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.POINTER(ctypes.c_int32), ctypes.c_uint32, ctypes.c_int32]
863
+ except AttributeError:
864
+ pass
865
+ off_t = ctypes.c_int64
866
+ try:
867
+ io_uring_prep_fallocate = _libraries['FIXME_STUB'].io_uring_prep_fallocate
868
+ io_uring_prep_fallocate.restype = None
869
+ io_uring_prep_fallocate.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.c_int32, off_t, off_t]
870
+ except AttributeError:
871
+ pass
872
+ mode_t = ctypes.c_uint32
873
+ try:
874
+ io_uring_prep_openat = _libraries['FIXME_STUB'].io_uring_prep_openat
875
+ io_uring_prep_openat.restype = None
876
+ io_uring_prep_openat.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.c_int32, mode_t]
877
+ except AttributeError:
878
+ pass
879
+ try:
880
+ io_uring_prep_openat_direct = _libraries['FIXME_STUB'].io_uring_prep_openat_direct
881
+ io_uring_prep_openat_direct.restype = None
882
+ io_uring_prep_openat_direct.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.c_int32, mode_t, ctypes.c_uint32]
883
+ except AttributeError:
884
+ pass
885
+ try:
886
+ io_uring_prep_close = _libraries['FIXME_STUB'].io_uring_prep_close
887
+ io_uring_prep_close.restype = None
888
+ io_uring_prep_close.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32]
889
+ except AttributeError:
890
+ pass
891
+ try:
892
+ io_uring_prep_read = _libraries['FIXME_STUB'].io_uring_prep_read
893
+ io_uring_prep_read.restype = None
894
+ io_uring_prep_read.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.POINTER(None), ctypes.c_uint32, __u64]
895
+ except AttributeError:
896
+ pass
897
+ try:
898
+ io_uring_prep_write = _libraries['FIXME_STUB'].io_uring_prep_write
899
+ io_uring_prep_write.restype = None
900
+ io_uring_prep_write.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.POINTER(None), ctypes.c_uint32, __u64]
901
+ except AttributeError:
902
+ pass
903
+ class struct_statx(Structure):
904
+ pass
905
+
906
+ try:
907
+ io_uring_prep_statx = _libraries['FIXME_STUB'].io_uring_prep_statx
908
+ io_uring_prep_statx.restype = None
909
+ io_uring_prep_statx.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.c_uint32, ctypes.POINTER(struct_statx)]
910
+ except AttributeError:
911
+ pass
912
+ try:
913
+ io_uring_prep_fadvise = _libraries['FIXME_STUB'].io_uring_prep_fadvise
914
+ io_uring_prep_fadvise.restype = None
915
+ io_uring_prep_fadvise.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, __u64, off_t, ctypes.c_int32]
916
+ except AttributeError:
917
+ pass
918
+ try:
919
+ io_uring_prep_madvise = _libraries['FIXME_STUB'].io_uring_prep_madvise
920
+ io_uring_prep_madvise.restype = None
921
+ io_uring_prep_madvise.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.POINTER(None), off_t, ctypes.c_int32]
922
+ except AttributeError:
923
+ pass
924
+ try:
925
+ io_uring_prep_send = _libraries['FIXME_STUB'].io_uring_prep_send
926
+ io_uring_prep_send.restype = None
927
+ io_uring_prep_send.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.POINTER(None), size_t, ctypes.c_int32]
928
+ except AttributeError:
929
+ pass
930
+ try:
931
+ io_uring_prep_recv = _libraries['FIXME_STUB'].io_uring_prep_recv
932
+ io_uring_prep_recv.restype = None
933
+ io_uring_prep_recv.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.POINTER(None), size_t, ctypes.c_int32]
934
+ except AttributeError:
935
+ pass
936
+ class struct_open_how(Structure):
937
+ pass
938
+
939
+ struct_open_how._pack_ = 1 # source:False
940
+ struct_open_how._fields_ = [
941
+ ('flags', ctypes.c_uint64),
942
+ ('mode', ctypes.c_uint64),
943
+ ('resolve', ctypes.c_uint64),
944
+ ]
945
+
946
+ try:
947
+ io_uring_prep_openat2 = _libraries['FIXME_STUB'].io_uring_prep_openat2
948
+ io_uring_prep_openat2.restype = None
949
+ io_uring_prep_openat2.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(struct_open_how)]
950
+ except AttributeError:
951
+ pass
952
+ try:
953
+ io_uring_prep_openat2_direct = _libraries['FIXME_STUB'].io_uring_prep_openat2_direct
954
+ io_uring_prep_openat2_direct.restype = None
955
+ io_uring_prep_openat2_direct.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.POINTER(struct_open_how), ctypes.c_uint32]
956
+ except AttributeError:
957
+ pass
958
+ class struct_epoll_event(Structure):
959
+ pass
960
+
961
+ try:
962
+ io_uring_prep_epoll_ctl = _libraries['FIXME_STUB'].io_uring_prep_epoll_ctl
963
+ io_uring_prep_epoll_ctl.restype = None
964
+ io_uring_prep_epoll_ctl.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(struct_epoll_event)]
965
+ except AttributeError:
966
+ pass
967
+ try:
968
+ io_uring_prep_provide_buffers = _libraries['FIXME_STUB'].io_uring_prep_provide_buffers
969
+ io_uring_prep_provide_buffers.restype = None
970
+ io_uring_prep_provide_buffers.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.POINTER(None), ctypes.c_int32, ctypes.c_int32, ctypes.c_int32, ctypes.c_int32]
971
+ except AttributeError:
972
+ pass
973
+ try:
974
+ io_uring_prep_remove_buffers = _libraries['FIXME_STUB'].io_uring_prep_remove_buffers
975
+ io_uring_prep_remove_buffers.restype = None
976
+ io_uring_prep_remove_buffers.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.c_int32]
977
+ except AttributeError:
978
+ pass
979
+ try:
980
+ io_uring_prep_shutdown = _libraries['FIXME_STUB'].io_uring_prep_shutdown
981
+ io_uring_prep_shutdown.restype = None
982
+ io_uring_prep_shutdown.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.c_int32]
983
+ except AttributeError:
984
+ pass
985
+ try:
986
+ io_uring_prep_unlinkat = _libraries['FIXME_STUB'].io_uring_prep_unlinkat
987
+ io_uring_prep_unlinkat.restype = None
988
+ io_uring_prep_unlinkat.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.c_int32]
989
+ except AttributeError:
990
+ pass
991
+ try:
992
+ io_uring_prep_renameat = _libraries['FIXME_STUB'].io_uring_prep_renameat
993
+ io_uring_prep_renameat.restype = None
994
+ io_uring_prep_renameat.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.c_int32]
995
+ except AttributeError:
996
+ pass
997
+ try:
998
+ io_uring_prep_sync_file_range = _libraries['FIXME_STUB'].io_uring_prep_sync_file_range
999
+ io_uring_prep_sync_file_range.restype = None
1000
+ io_uring_prep_sync_file_range.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.c_uint32, __u64, ctypes.c_int32]
1001
+ except AttributeError:
1002
+ pass
1003
+ try:
1004
+ io_uring_prep_mkdirat = _libraries['FIXME_STUB'].io_uring_prep_mkdirat
1005
+ io_uring_prep_mkdirat.restype = None
1006
+ io_uring_prep_mkdirat.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.POINTER(ctypes.c_char), mode_t]
1007
+ except AttributeError:
1008
+ pass
1009
+ try:
1010
+ io_uring_prep_symlinkat = _libraries['FIXME_STUB'].io_uring_prep_symlinkat
1011
+ io_uring_prep_symlinkat.restype = None
1012
+ io_uring_prep_symlinkat.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_char)]
1013
+ except AttributeError:
1014
+ pass
1015
+ try:
1016
+ io_uring_prep_linkat = _libraries['FIXME_STUB'].io_uring_prep_linkat
1017
+ io_uring_prep_linkat.restype = None
1018
+ io_uring_prep_linkat.argtypes = [ctypes.POINTER(struct_io_uring_sqe), ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.c_int32, ctypes.POINTER(ctypes.c_char), ctypes.c_int32]
1019
+ except AttributeError:
1020
+ pass
1021
+ try:
1022
+ io_uring_sq_ready = _libraries['FIXME_STUB'].io_uring_sq_ready
1023
+ io_uring_sq_ready.restype = ctypes.c_uint32
1024
+ io_uring_sq_ready.argtypes = [ctypes.POINTER(struct_io_uring)]
1025
+ except AttributeError:
1026
+ pass
1027
+ try:
1028
+ io_uring_sq_space_left = _libraries['FIXME_STUB'].io_uring_sq_space_left
1029
+ io_uring_sq_space_left.restype = ctypes.c_uint32
1030
+ io_uring_sq_space_left.argtypes = [ctypes.POINTER(struct_io_uring)]
1031
+ except AttributeError:
1032
+ pass
1033
+ try:
1034
+ io_uring_sqring_wait = _libraries['FIXME_STUB'].io_uring_sqring_wait
1035
+ io_uring_sqring_wait.restype = ctypes.c_int32
1036
+ io_uring_sqring_wait.argtypes = [ctypes.POINTER(struct_io_uring)]
1037
+ except AttributeError:
1038
+ pass
1039
+ try:
1040
+ io_uring_cq_ready = _libraries['FIXME_STUB'].io_uring_cq_ready
1041
+ io_uring_cq_ready.restype = ctypes.c_uint32
1042
+ io_uring_cq_ready.argtypes = [ctypes.POINTER(struct_io_uring)]
1043
+ except AttributeError:
1044
+ pass
1045
+ try:
1046
+ io_uring_cq_eventfd_enabled = _libraries['FIXME_STUB'].io_uring_cq_eventfd_enabled
1047
+ io_uring_cq_eventfd_enabled.restype = ctypes.c_bool
1048
+ io_uring_cq_eventfd_enabled.argtypes = [ctypes.POINTER(struct_io_uring)]
1049
+ except AttributeError:
1050
+ pass
1051
+ try:
1052
+ io_uring_cq_eventfd_toggle = _libraries['FIXME_STUB'].io_uring_cq_eventfd_toggle
1053
+ io_uring_cq_eventfd_toggle.restype = ctypes.c_int32
1054
+ io_uring_cq_eventfd_toggle.argtypes = [ctypes.POINTER(struct_io_uring), ctypes.c_bool]
1055
+ except AttributeError:
1056
+ pass
1057
+ try:
1058
+ io_uring_wait_cqe_nr = _libraries['FIXME_STUB'].io_uring_wait_cqe_nr
1059
+ io_uring_wait_cqe_nr.restype = ctypes.c_int32
1060
+ io_uring_wait_cqe_nr.argtypes = [ctypes.POINTER(struct_io_uring), ctypes.POINTER(ctypes.POINTER(struct_io_uring_cqe)), ctypes.c_uint32]
1061
+ except AttributeError:
1062
+ pass
1063
+ try:
1064
+ io_uring_peek_cqe = _libraries['FIXME_STUB'].io_uring_peek_cqe
1065
+ io_uring_peek_cqe.restype = ctypes.c_int32
1066
+ io_uring_peek_cqe.argtypes = [ctypes.POINTER(struct_io_uring), ctypes.POINTER(ctypes.POINTER(struct_io_uring_cqe))]
1067
+ except AttributeError:
1068
+ pass
1069
+ try:
1070
+ io_uring_wait_cqe = _libraries['FIXME_STUB'].io_uring_wait_cqe
1071
+ io_uring_wait_cqe.restype = ctypes.c_int32
1072
+ io_uring_wait_cqe.argtypes = [ctypes.POINTER(struct_io_uring), ctypes.POINTER(ctypes.POINTER(struct_io_uring_cqe))]
1073
+ except AttributeError:
1074
+ pass
1075
+ ssize_t = ctypes.c_int64
1076
+ try:
1077
+ io_uring_mlock_size = _libraries['FIXME_STUB'].io_uring_mlock_size
1078
+ io_uring_mlock_size.restype = ssize_t
1079
+ io_uring_mlock_size.argtypes = [ctypes.c_uint32, ctypes.c_uint32]
1080
+ except AttributeError:
1081
+ pass
1082
+ try:
1083
+ io_uring_mlock_size_params = _libraries['FIXME_STUB'].io_uring_mlock_size_params
1084
+ io_uring_mlock_size_params.restype = ssize_t
1085
+ io_uring_mlock_size_params.argtypes = [ctypes.c_uint32, ctypes.POINTER(struct_io_uring_params)]
1086
+ except AttributeError:
1087
+ pass
1088
+
1089
+ # values for enumeration 'c__Ea_IOSQE_FIXED_FILE_BIT'
1090
+ c__Ea_IOSQE_FIXED_FILE_BIT__enumvalues = {
1091
+ 0: 'IOSQE_FIXED_FILE_BIT',
1092
+ 1: 'IOSQE_IO_DRAIN_BIT',
1093
+ 2: 'IOSQE_IO_LINK_BIT',
1094
+ 3: 'IOSQE_IO_HARDLINK_BIT',
1095
+ 4: 'IOSQE_ASYNC_BIT',
1096
+ 5: 'IOSQE_BUFFER_SELECT_BIT',
1097
+ }
1098
+ IOSQE_FIXED_FILE_BIT = 0
1099
+ IOSQE_IO_DRAIN_BIT = 1
1100
+ IOSQE_IO_LINK_BIT = 2
1101
+ IOSQE_IO_HARDLINK_BIT = 3
1102
+ IOSQE_ASYNC_BIT = 4
1103
+ IOSQE_BUFFER_SELECT_BIT = 5
1104
+ c__Ea_IOSQE_FIXED_FILE_BIT = ctypes.c_uint32 # enum
1105
+
1106
+ # values for enumeration 'c__Ea_IORING_OP_NOP'
1107
+ c__Ea_IORING_OP_NOP__enumvalues = {
1108
+ 0: 'IORING_OP_NOP',
1109
+ 1: 'IORING_OP_READV',
1110
+ 2: 'IORING_OP_WRITEV',
1111
+ 3: 'IORING_OP_FSYNC',
1112
+ 4: 'IORING_OP_READ_FIXED',
1113
+ 5: 'IORING_OP_WRITE_FIXED',
1114
+ 6: 'IORING_OP_POLL_ADD',
1115
+ 7: 'IORING_OP_POLL_REMOVE',
1116
+ 8: 'IORING_OP_SYNC_FILE_RANGE',
1117
+ 9: 'IORING_OP_SENDMSG',
1118
+ 10: 'IORING_OP_RECVMSG',
1119
+ 11: 'IORING_OP_TIMEOUT',
1120
+ 12: 'IORING_OP_TIMEOUT_REMOVE',
1121
+ 13: 'IORING_OP_ACCEPT',
1122
+ 14: 'IORING_OP_ASYNC_CANCEL',
1123
+ 15: 'IORING_OP_LINK_TIMEOUT',
1124
+ 16: 'IORING_OP_CONNECT',
1125
+ 17: 'IORING_OP_FALLOCATE',
1126
+ 18: 'IORING_OP_OPENAT',
1127
+ 19: 'IORING_OP_CLOSE',
1128
+ 20: 'IORING_OP_FILES_UPDATE',
1129
+ 21: 'IORING_OP_STATX',
1130
+ 22: 'IORING_OP_READ',
1131
+ 23: 'IORING_OP_WRITE',
1132
+ 24: 'IORING_OP_FADVISE',
1133
+ 25: 'IORING_OP_MADVISE',
1134
+ 26: 'IORING_OP_SEND',
1135
+ 27: 'IORING_OP_RECV',
1136
+ 28: 'IORING_OP_OPENAT2',
1137
+ 29: 'IORING_OP_EPOLL_CTL',
1138
+ 30: 'IORING_OP_SPLICE',
1139
+ 31: 'IORING_OP_PROVIDE_BUFFERS',
1140
+ 32: 'IORING_OP_REMOVE_BUFFERS',
1141
+ 33: 'IORING_OP_TEE',
1142
+ 34: 'IORING_OP_SHUTDOWN',
1143
+ 35: 'IORING_OP_RENAMEAT',
1144
+ 36: 'IORING_OP_UNLINKAT',
1145
+ 37: 'IORING_OP_MKDIRAT',
1146
+ 38: 'IORING_OP_SYMLINKAT',
1147
+ 39: 'IORING_OP_LINKAT',
1148
+ 40: 'IORING_OP_LAST',
1149
+ }
1150
+ IORING_OP_NOP = 0
1151
+ IORING_OP_READV = 1
1152
+ IORING_OP_WRITEV = 2
1153
+ IORING_OP_FSYNC = 3
1154
+ IORING_OP_READ_FIXED = 4
1155
+ IORING_OP_WRITE_FIXED = 5
1156
+ IORING_OP_POLL_ADD = 6
1157
+ IORING_OP_POLL_REMOVE = 7
1158
+ IORING_OP_SYNC_FILE_RANGE = 8
1159
+ IORING_OP_SENDMSG = 9
1160
+ IORING_OP_RECVMSG = 10
1161
+ IORING_OP_TIMEOUT = 11
1162
+ IORING_OP_TIMEOUT_REMOVE = 12
1163
+ IORING_OP_ACCEPT = 13
1164
+ IORING_OP_ASYNC_CANCEL = 14
1165
+ IORING_OP_LINK_TIMEOUT = 15
1166
+ IORING_OP_CONNECT = 16
1167
+ IORING_OP_FALLOCATE = 17
1168
+ IORING_OP_OPENAT = 18
1169
+ IORING_OP_CLOSE = 19
1170
+ IORING_OP_FILES_UPDATE = 20
1171
+ IORING_OP_STATX = 21
1172
+ IORING_OP_READ = 22
1173
+ IORING_OP_WRITE = 23
1174
+ IORING_OP_FADVISE = 24
1175
+ IORING_OP_MADVISE = 25
1176
+ IORING_OP_SEND = 26
1177
+ IORING_OP_RECV = 27
1178
+ IORING_OP_OPENAT2 = 28
1179
+ IORING_OP_EPOLL_CTL = 29
1180
+ IORING_OP_SPLICE = 30
1181
+ IORING_OP_PROVIDE_BUFFERS = 31
1182
+ IORING_OP_REMOVE_BUFFERS = 32
1183
+ IORING_OP_TEE = 33
1184
+ IORING_OP_SHUTDOWN = 34
1185
+ IORING_OP_RENAMEAT = 35
1186
+ IORING_OP_UNLINKAT = 36
1187
+ IORING_OP_MKDIRAT = 37
1188
+ IORING_OP_SYMLINKAT = 38
1189
+ IORING_OP_LINKAT = 39
1190
+ IORING_OP_LAST = 40
1191
+ c__Ea_IORING_OP_NOP = ctypes.c_uint32 # enum
1192
+
1193
+ # values for enumeration 'c__Ea_IORING_CQE_BUFFER_SHIFT'
1194
+ c__Ea_IORING_CQE_BUFFER_SHIFT__enumvalues = {
1195
+ 16: 'IORING_CQE_BUFFER_SHIFT',
1196
+ }
1197
+ IORING_CQE_BUFFER_SHIFT = 16
1198
+ c__Ea_IORING_CQE_BUFFER_SHIFT = ctypes.c_uint32 # enum
1199
+
1200
+ # values for enumeration 'c__Ea_IORING_REGISTER_BUFFERS'
1201
+ c__Ea_IORING_REGISTER_BUFFERS__enumvalues = {
1202
+ 0: 'IORING_REGISTER_BUFFERS',
1203
+ 1: 'IORING_UNREGISTER_BUFFERS',
1204
+ 2: 'IORING_REGISTER_FILES',
1205
+ 3: 'IORING_UNREGISTER_FILES',
1206
+ 4: 'IORING_REGISTER_EVENTFD',
1207
+ 5: 'IORING_UNREGISTER_EVENTFD',
1208
+ 6: 'IORING_REGISTER_FILES_UPDATE',
1209
+ 7: 'IORING_REGISTER_EVENTFD_ASYNC',
1210
+ 8: 'IORING_REGISTER_PROBE',
1211
+ 9: 'IORING_REGISTER_PERSONALITY',
1212
+ 10: 'IORING_UNREGISTER_PERSONALITY',
1213
+ 11: 'IORING_REGISTER_RESTRICTIONS',
1214
+ 12: 'IORING_REGISTER_ENABLE_RINGS',
1215
+ 13: 'IORING_REGISTER_FILES2',
1216
+ 14: 'IORING_REGISTER_FILES_UPDATE2',
1217
+ 15: 'IORING_REGISTER_BUFFERS2',
1218
+ 16: 'IORING_REGISTER_BUFFERS_UPDATE',
1219
+ 17: 'IORING_REGISTER_IOWQ_AFF',
1220
+ 18: 'IORING_UNREGISTER_IOWQ_AFF',
1221
+ 19: 'IORING_REGISTER_IOWQ_MAX_WORKERS',
1222
+ 20: 'IORING_REGISTER_LAST',
1223
+ }
1224
+ IORING_REGISTER_BUFFERS = 0
1225
+ IORING_UNREGISTER_BUFFERS = 1
1226
+ IORING_REGISTER_FILES = 2
1227
+ IORING_UNREGISTER_FILES = 3
1228
+ IORING_REGISTER_EVENTFD = 4
1229
+ IORING_UNREGISTER_EVENTFD = 5
1230
+ IORING_REGISTER_FILES_UPDATE = 6
1231
+ IORING_REGISTER_EVENTFD_ASYNC = 7
1232
+ IORING_REGISTER_PROBE = 8
1233
+ IORING_REGISTER_PERSONALITY = 9
1234
+ IORING_UNREGISTER_PERSONALITY = 10
1235
+ IORING_REGISTER_RESTRICTIONS = 11
1236
+ IORING_REGISTER_ENABLE_RINGS = 12
1237
+ IORING_REGISTER_FILES2 = 13
1238
+ IORING_REGISTER_FILES_UPDATE2 = 14
1239
+ IORING_REGISTER_BUFFERS2 = 15
1240
+ IORING_REGISTER_BUFFERS_UPDATE = 16
1241
+ IORING_REGISTER_IOWQ_AFF = 17
1242
+ IORING_UNREGISTER_IOWQ_AFF = 18
1243
+ IORING_REGISTER_IOWQ_MAX_WORKERS = 19
1244
+ IORING_REGISTER_LAST = 20
1245
+ c__Ea_IORING_REGISTER_BUFFERS = ctypes.c_uint32 # enum
1246
+
1247
+ # values for enumeration 'c__Ea_IO_WQ_BOUND'
1248
+ c__Ea_IO_WQ_BOUND__enumvalues = {
1249
+ 0: 'IO_WQ_BOUND',
1250
+ 1: 'IO_WQ_UNBOUND',
1251
+ }
1252
+ IO_WQ_BOUND = 0
1253
+ IO_WQ_UNBOUND = 1
1254
+ c__Ea_IO_WQ_BOUND = ctypes.c_uint32 # enum
1255
+ class struct_io_uring_files_update(Structure):
1256
+ pass
1257
+
1258
+ struct_io_uring_files_update._pack_ = 1 # source:False
1259
+ struct_io_uring_files_update._fields_ = [
1260
+ ('offset', ctypes.c_uint32),
1261
+ ('resv', ctypes.c_uint32),
1262
+ ('fds', ctypes.c_uint64),
1263
+ ]
1264
+
1265
+ class struct_io_uring_rsrc_register(Structure):
1266
+ pass
1267
+
1268
+ struct_io_uring_rsrc_register._pack_ = 1 # source:False
1269
+ struct_io_uring_rsrc_register._fields_ = [
1270
+ ('nr', ctypes.c_uint32),
1271
+ ('resv', ctypes.c_uint32),
1272
+ ('resv2', ctypes.c_uint64),
1273
+ ('data', ctypes.c_uint64),
1274
+ ('tags', ctypes.c_uint64),
1275
+ ]
1276
+
1277
+ class struct_io_uring_rsrc_update(Structure):
1278
+ pass
1279
+
1280
+ struct_io_uring_rsrc_update._pack_ = 1 # source:False
1281
+ struct_io_uring_rsrc_update._fields_ = [
1282
+ ('offset', ctypes.c_uint32),
1283
+ ('resv', ctypes.c_uint32),
1284
+ ('data', ctypes.c_uint64),
1285
+ ]
1286
+
1287
+ class struct_io_uring_rsrc_update2(Structure):
1288
+ pass
1289
+
1290
+ struct_io_uring_rsrc_update2._pack_ = 1 # source:False
1291
+ struct_io_uring_rsrc_update2._fields_ = [
1292
+ ('offset', ctypes.c_uint32),
1293
+ ('resv', ctypes.c_uint32),
1294
+ ('data', ctypes.c_uint64),
1295
+ ('tags', ctypes.c_uint64),
1296
+ ('nr', ctypes.c_uint32),
1297
+ ('resv2', ctypes.c_uint32),
1298
+ ]
1299
+
1300
+
1301
+ # values for enumeration 'c__Ea_IORING_RESTRICTION_REGISTER_OP'
1302
+ c__Ea_IORING_RESTRICTION_REGISTER_OP__enumvalues = {
1303
+ 0: 'IORING_RESTRICTION_REGISTER_OP',
1304
+ 1: 'IORING_RESTRICTION_SQE_OP',
1305
+ 2: 'IORING_RESTRICTION_SQE_FLAGS_ALLOWED',
1306
+ 3: 'IORING_RESTRICTION_SQE_FLAGS_REQUIRED',
1307
+ 4: 'IORING_RESTRICTION_LAST',
1308
+ }
1309
+ IORING_RESTRICTION_REGISTER_OP = 0
1310
+ IORING_RESTRICTION_SQE_OP = 1
1311
+ IORING_RESTRICTION_SQE_FLAGS_ALLOWED = 2
1312
+ IORING_RESTRICTION_SQE_FLAGS_REQUIRED = 3
1313
+ IORING_RESTRICTION_LAST = 4
1314
+ c__Ea_IORING_RESTRICTION_REGISTER_OP = ctypes.c_uint32 # enum
1315
+ class struct_io_uring_getevents_arg(Structure):
1316
+ pass
1317
+
1318
+ struct_io_uring_getevents_arg._pack_ = 1 # source:False
1319
+ struct_io_uring_getevents_arg._fields_ = [
1320
+ ('sigmask', ctypes.c_uint64),
1321
+ ('sigmask_sz', ctypes.c_uint32),
1322
+ ('pad', ctypes.c_uint32),
1323
+ ('ts', ctypes.c_uint64),
1324
+ ]
1325
+
1326
+ __all__ = \
1327
+ ['IORING_CQE_BUFFER_SHIFT', 'IORING_OP_ACCEPT',
1328
+ 'IORING_OP_ASYNC_CANCEL', 'IORING_OP_CLOSE', 'IORING_OP_CONNECT',
1329
+ 'IORING_OP_EPOLL_CTL', 'IORING_OP_FADVISE', 'IORING_OP_FALLOCATE',
1330
+ 'IORING_OP_FILES_UPDATE', 'IORING_OP_FSYNC', 'IORING_OP_LAST',
1331
+ 'IORING_OP_LINKAT', 'IORING_OP_LINK_TIMEOUT', 'IORING_OP_MADVISE',
1332
+ 'IORING_OP_MKDIRAT', 'IORING_OP_NOP', 'IORING_OP_OPENAT',
1333
+ 'IORING_OP_OPENAT2', 'IORING_OP_POLL_ADD',
1334
+ 'IORING_OP_POLL_REMOVE', 'IORING_OP_PROVIDE_BUFFERS',
1335
+ 'IORING_OP_READ', 'IORING_OP_READV', 'IORING_OP_READ_FIXED',
1336
+ 'IORING_OP_RECV', 'IORING_OP_RECVMSG', 'IORING_OP_REMOVE_BUFFERS',
1337
+ 'IORING_OP_RENAMEAT', 'IORING_OP_SEND', 'IORING_OP_SENDMSG',
1338
+ 'IORING_OP_SHUTDOWN', 'IORING_OP_SPLICE', 'IORING_OP_STATX',
1339
+ 'IORING_OP_SYMLINKAT', 'IORING_OP_SYNC_FILE_RANGE',
1340
+ 'IORING_OP_TEE', 'IORING_OP_TIMEOUT', 'IORING_OP_TIMEOUT_REMOVE',
1341
+ 'IORING_OP_UNLINKAT', 'IORING_OP_WRITE', 'IORING_OP_WRITEV',
1342
+ 'IORING_OP_WRITE_FIXED', 'IORING_REGISTER_BUFFERS',
1343
+ 'IORING_REGISTER_BUFFERS2', 'IORING_REGISTER_BUFFERS_UPDATE',
1344
+ 'IORING_REGISTER_ENABLE_RINGS', 'IORING_REGISTER_EVENTFD',
1345
+ 'IORING_REGISTER_EVENTFD_ASYNC', 'IORING_REGISTER_FILES',
1346
+ 'IORING_REGISTER_FILES2', 'IORING_REGISTER_FILES_UPDATE',
1347
+ 'IORING_REGISTER_FILES_UPDATE2', 'IORING_REGISTER_IOWQ_AFF',
1348
+ 'IORING_REGISTER_IOWQ_MAX_WORKERS', 'IORING_REGISTER_LAST',
1349
+ 'IORING_REGISTER_PERSONALITY', 'IORING_REGISTER_PROBE',
1350
+ 'IORING_REGISTER_RESTRICTIONS', 'IORING_RESTRICTION_LAST',
1351
+ 'IORING_RESTRICTION_REGISTER_OP',
1352
+ 'IORING_RESTRICTION_SQE_FLAGS_ALLOWED',
1353
+ 'IORING_RESTRICTION_SQE_FLAGS_REQUIRED',
1354
+ 'IORING_RESTRICTION_SQE_OP', 'IORING_UNREGISTER_BUFFERS',
1355
+ 'IORING_UNREGISTER_EVENTFD', 'IORING_UNREGISTER_FILES',
1356
+ 'IORING_UNREGISTER_IOWQ_AFF', 'IORING_UNREGISTER_PERSONALITY',
1357
+ 'IOSQE_ASYNC_BIT', 'IOSQE_BUFFER_SELECT_BIT',
1358
+ 'IOSQE_FIXED_FILE_BIT', 'IOSQE_IO_DRAIN_BIT',
1359
+ 'IOSQE_IO_HARDLINK_BIT', 'IOSQE_IO_LINK_BIT', 'IO_WQ_BOUND',
1360
+ 'IO_WQ_UNBOUND', '__io_uring_get_cqe',
1361
+ '__io_uring_prep_poll_mask', '__io_uring_set_target_fixed_file',
1362
+ '__io_uring_sqring_wait', '__u64',
1363
+ 'c__Ea_IORING_CQE_BUFFER_SHIFT', 'c__Ea_IORING_OP_NOP',
1364
+ 'c__Ea_IORING_REGISTER_BUFFERS',
1365
+ 'c__Ea_IORING_RESTRICTION_REGISTER_OP',
1366
+ 'c__Ea_IOSQE_FIXED_FILE_BIT', 'c__Ea_IO_WQ_BOUND', 'int64_t',
1367
+ 'io_uring_cq_advance', 'io_uring_cq_eventfd_enabled',
1368
+ 'io_uring_cq_eventfd_toggle', 'io_uring_cq_ready',
1369
+ 'io_uring_cqe_get_data', 'io_uring_cqe_seen',
1370
+ 'io_uring_enable_rings', 'io_uring_free_probe',
1371
+ 'io_uring_get_probe', 'io_uring_get_probe_ring',
1372
+ 'io_uring_get_sqe', 'io_uring_mlock_size',
1373
+ 'io_uring_mlock_size_params', 'io_uring_opcode_supported',
1374
+ 'io_uring_peek_batch_cqe', 'io_uring_peek_cqe',
1375
+ 'io_uring_prep_accept', 'io_uring_prep_accept_direct',
1376
+ 'io_uring_prep_cancel', 'io_uring_prep_close',
1377
+ 'io_uring_prep_connect', 'io_uring_prep_epoll_ctl',
1378
+ 'io_uring_prep_fadvise', 'io_uring_prep_fallocate',
1379
+ 'io_uring_prep_files_update', 'io_uring_prep_fsync',
1380
+ 'io_uring_prep_link_timeout', 'io_uring_prep_linkat',
1381
+ 'io_uring_prep_madvise', 'io_uring_prep_mkdirat',
1382
+ 'io_uring_prep_nop', 'io_uring_prep_openat',
1383
+ 'io_uring_prep_openat2', 'io_uring_prep_openat2_direct',
1384
+ 'io_uring_prep_openat_direct', 'io_uring_prep_poll_add',
1385
+ 'io_uring_prep_poll_multishot', 'io_uring_prep_poll_remove',
1386
+ 'io_uring_prep_poll_update', 'io_uring_prep_provide_buffers',
1387
+ 'io_uring_prep_read', 'io_uring_prep_read_fixed',
1388
+ 'io_uring_prep_readv', 'io_uring_prep_recv',
1389
+ 'io_uring_prep_recvmsg', 'io_uring_prep_remove_buffers',
1390
+ 'io_uring_prep_renameat', 'io_uring_prep_rw',
1391
+ 'io_uring_prep_send', 'io_uring_prep_sendmsg',
1392
+ 'io_uring_prep_shutdown', 'io_uring_prep_splice',
1393
+ 'io_uring_prep_statx', 'io_uring_prep_symlinkat',
1394
+ 'io_uring_prep_sync_file_range', 'io_uring_prep_tee',
1395
+ 'io_uring_prep_timeout', 'io_uring_prep_timeout_remove',
1396
+ 'io_uring_prep_timeout_update', 'io_uring_prep_unlinkat',
1397
+ 'io_uring_prep_write', 'io_uring_prep_write_fixed',
1398
+ 'io_uring_prep_writev', 'io_uring_queue_exit',
1399
+ 'io_uring_queue_init', 'io_uring_queue_init_params',
1400
+ 'io_uring_queue_mmap', 'io_uring_register_buffers',
1401
+ 'io_uring_register_buffers_tags',
1402
+ 'io_uring_register_buffers_update_tag',
1403
+ 'io_uring_register_eventfd', 'io_uring_register_eventfd_async',
1404
+ 'io_uring_register_files', 'io_uring_register_files_tags',
1405
+ 'io_uring_register_files_update',
1406
+ 'io_uring_register_files_update_tag',
1407
+ 'io_uring_register_iowq_aff',
1408
+ 'io_uring_register_iowq_max_workers',
1409
+ 'io_uring_register_personality', 'io_uring_register_probe',
1410
+ 'io_uring_register_restrictions', 'io_uring_ring_dontfork',
1411
+ 'io_uring_sq_ready', 'io_uring_sq_space_left',
1412
+ 'io_uring_sqe_set_data', 'io_uring_sqe_set_flags',
1413
+ 'io_uring_sqring_wait', 'io_uring_submit',
1414
+ 'io_uring_submit_and_wait', 'io_uring_unregister_buffers',
1415
+ 'io_uring_unregister_eventfd', 'io_uring_unregister_files',
1416
+ 'io_uring_unregister_iowq_aff', 'io_uring_unregister_personality',
1417
+ 'io_uring_wait_cqe', 'io_uring_wait_cqe_nr',
1418
+ 'io_uring_wait_cqe_timeout', 'io_uring_wait_cqes', 'mode_t',
1419
+ 'off_t', 'size_t', 'socklen_t', 'ssize_t',
1420
+ 'struct___kernel_timespec', 'struct_c__SA___sigset_t',
1421
+ 'struct_c__SA_cpu_set_t', 'struct_epoll_event',
1422
+ 'struct_io_cqring_offsets', 'struct_io_sqring_offsets',
1423
+ 'struct_io_uring', 'struct_io_uring_cq', 'struct_io_uring_cqe',
1424
+ 'struct_io_uring_files_update', 'struct_io_uring_getevents_arg',
1425
+ 'struct_io_uring_params', 'struct_io_uring_probe',
1426
+ 'struct_io_uring_probe_op', 'struct_io_uring_restriction',
1427
+ 'struct_io_uring_rsrc_register', 'struct_io_uring_rsrc_update',
1428
+ 'struct_io_uring_rsrc_update2', 'struct_io_uring_sq',
1429
+ 'struct_io_uring_sqe', 'struct_iovec', 'struct_msghdr',
1430
+ 'struct_open_how', 'struct_sockaddr', 'struct_statx',
1431
+ 'union_io_uring_restriction_0', 'union_io_uring_sqe_0',
1432
+ 'union_io_uring_sqe_1', 'union_io_uring_sqe_2',
1433
+ 'union_io_uring_sqe_3', 'union_io_uring_sqe_4']
1434
+ NR_io_uring_setup = 425
1435
+ NR_io_uring_enter = 426
1436
+ NR_io_uring_register = 427
1437
+ IOSQE_FIXED_FILE = (1 << IOSQE_FIXED_FILE_BIT)
1438
+ IOSQE_IO_DRAIN = (1 << IOSQE_IO_DRAIN_BIT)
1439
+ IOSQE_IO_LINK = (1 << IOSQE_IO_LINK_BIT)
1440
+ IOSQE_IO_HARDLINK = (1 << IOSQE_IO_HARDLINK_BIT)
1441
+ IOSQE_ASYNC = (1 << IOSQE_ASYNC_BIT)
1442
+ IOSQE_BUFFER_SELECT = (1 << IOSQE_BUFFER_SELECT_BIT)
1443
+ IORING_SETUP_IOPOLL = (1 << 0)
1444
+ IORING_SETUP_SQPOLL = (1 << 1)
1445
+ IORING_SETUP_SQ_AFF = (1 << 2)
1446
+ IORING_SETUP_CQSIZE = (1 << 3)
1447
+ IORING_SETUP_CLAMP = (1 << 4)
1448
+ IORING_SETUP_ATTACH_WQ = (1 << 5)
1449
+ IORING_SETUP_R_DISABLED = (1 << 6)
1450
+ IORING_FSYNC_DATASYNC = (1 << 0)
1451
+ IORING_TIMEOUT_ABS = (1 << 0)
1452
+ IORING_TIMEOUT_UPDATE = (1 << 1)
1453
+ IORING_TIMEOUT_BOOTTIME = (1 << 2)
1454
+ IORING_TIMEOUT_REALTIME = (1 << 3)
1455
+ IORING_LINK_TIMEOUT_UPDATE = (1 << 4)
1456
+ IORING_TIMEOUT_CLOCK_MASK = (IORING_TIMEOUT_BOOTTIME | IORING_TIMEOUT_REALTIME)
1457
+ IORING_TIMEOUT_UPDATE_MASK = (IORING_TIMEOUT_UPDATE | IORING_LINK_TIMEOUT_UPDATE)
1458
+ SPLICE_F_FD_IN_FIXED = (1 << 31)
1459
+ IORING_POLL_ADD_MULTI = (1 << 0)
1460
+ IORING_POLL_UPDATE_EVENTS = (1 << 1)
1461
+ IORING_POLL_UPDATE_USER_DATA = (1 << 2)
1462
+ IORING_CQE_F_BUFFER = (1 << 0)
1463
+ IORING_CQE_F_MORE = (1 << 1)
1464
+ IORING_OFF_SQ_RING = 0
1465
+ IORING_OFF_CQ_RING = 0x8000000
1466
+ IORING_OFF_SQES = 0x10000000
1467
+ IORING_SQ_NEED_WAKEUP = (1 << 0)
1468
+ IORING_SQ_CQ_OVERFLOW = (1 << 1)
1469
+ IORING_CQ_EVENTFD_DISABLED = (1 << 0)
1470
+ IORING_ENTER_GETEVENTS = (1 << 0)
1471
+ IORING_ENTER_SQ_WAKEUP = (1 << 1)
1472
+ IORING_ENTER_SQ_WAIT = (1 << 2)
1473
+ IORING_ENTER_EXT_ARG = (1 << 3)
1474
+ IORING_FEAT_SINGLE_MMAP = (1 << 0)
1475
+ IORING_FEAT_NODROP = (1 << 1)
1476
+ IORING_FEAT_SUBMIT_STABLE = (1 << 2)
1477
+ IORING_FEAT_RW_CUR_POS = (1 << 3)
1478
+ IORING_FEAT_CUR_PERSONALITY = (1 << 4)
1479
+ IORING_FEAT_FAST_POLL = (1 << 5)
1480
+ IORING_FEAT_POLL_32BITS = (1 << 6)
1481
+ IORING_FEAT_SQPOLL_NONFIXED = (1 << 7)
1482
+ IORING_FEAT_EXT_ARG = (1 << 8)
1483
+ IORING_FEAT_NATIVE_WORKERS = (1 << 9)
1484
+ IORING_FEAT_RSRC_TAGS = (1 << 10)
1485
+ IORING_REGISTER_FILES_SKIP = (-2)
1486
+ IO_URING_OP_SUPPORTED = (1 << 0)