File: uio.pxd

package info (click to toggle)
cython 3.1.6%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 19,932 kB
  • sloc: python: 92,172; ansic: 19,275; cpp: 1,407; xml: 1,031; javascript: 511; makefile: 373; sh: 223; sed: 11
file content (26 lines) | stat: -rw-r--r-- 822 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_uio.h.html

from posix.types cimport off_t


cdef extern from "<sys/uio.h>" nogil:

    cdef struct iovec:
        void  *iov_base
        size_t iov_len

    ssize_t readv (int fd, const iovec *iov, int iovcnt)
    ssize_t writev(int fd, const iovec *iov, int iovcnt)

    # Linux-specific, https://man7.org/linux/man-pages/man2/readv.2.html
    ssize_t preadv (int fd, const iovec *iov, int iovcnt, off_t offset)
    ssize_t pwritev(int fd, const iovec *iov, int iovcnt, off_t offset)

    enum: RWF_DSYNC
    enum: RWF_HIPRI
    enum: RWF_SYNC
    enum: RWF_NOWAIT
    enum: RWF_APPEND

    ssize_t preadv2 (int fd, const iovec *iov, int iovcnt, off_t offset, int flags)
    ssize_t pwritev2(int fd, const iovec *iov, int iovcnt, off_t offset, int flags)