-
Notifications
You must be signed in to change notification settings - Fork 3
/
syscall.pyx
24 lines (21 loc) · 1.12 KB
/
syscall.pyx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Raw access to `io_uring` syscalls.
cpdef int io_uring_enter(unsigned int fd,
unsigned int to_submit,
unsigned int min_complete,
unsigned int flags,
sigset sig) nogil:
return trap_error(__io_uring_enter(fd, to_submit, min_complete, flags, sig.ptr))
cpdef int io_uring_enter2(unsigned int fd,
unsigned int to_submit,
unsigned int min_complete,
unsigned int flags,
sigset sig,
size_t sz) nogil:
return trap_error(__io_uring_enter2(fd, to_submit, min_complete, flags, sig.ptr, sz))
cpdef int io_uring_setup(unsigned int entries, io_uring_params p) nogil:
return trap_error(__io_uring_setup(entries, p.ptr))
cpdef int io_uring_register(unsigned int fd,
unsigned int opcode,
const unsigned char[:] arg, # const void * arg,
unsigned int nr_args) nogil:
return trap_error(__io_uring_register(fd, opcode, &arg[0], nr_args))