@@ -3711,10 +3711,21 @@ PyDoc_STRVAR(os_preadv__doc__,
37113711"preadv($module, fd, buffers, offset, flags=0, /)\n"
37123712"--\n"
37133713"\n"
3714- "Read a number of bytes from a file descriptor starting at a particular offset .\n"
3714+ "Reads from a file descriptor into a number of mutable bytes-like objects .\n"
37153715"\n"
3716- "Read length bytes from file descriptor fd, starting at offset bytes from\n"
3717- "the beginning of the file. The file offset remains unchanged." );
3716+ "Combines the functionality of readv() and pread(). As readv(), it will\n"
3717+ "transfer data into each buffer until it is full and then move on to the next\n"
3718+ "buffer in the sequence to hold the rest of the data. Its fourth argument,\n"
3719+ "specifies the file offset at which the input operation is to be performed. It\n"
3720+ "will return the total number of bytes read (which can be less than the total\n"
3721+ "capacity of all the objects).\n"
3722+ "\n"
3723+ "The flags argument contains a bitwise OR of zero or more of the following flags:\n"
3724+ "\n"
3725+ "- RWF_HIPRI\n"
3726+ "- RWF_NOWAIT\n"
3727+ "\n"
3728+ "Using non-zero flags requires Linux 4.6 or newer." );
37183729
37193730#define OS_PREADV_METHODDEF \
37203731 {"preadv", (PyCFunction)os_preadv, METH_FASTCALL, os_preadv__doc__},
@@ -4013,11 +4024,21 @@ PyDoc_STRVAR(os_pwritev__doc__,
40134024"pwritev($module, fd, buffers, offset, flags=0, /)\n"
40144025"--\n"
40154026"\n"
4016- "Write bytes to a file descriptor starting at a particular offset.\n"
4027+ "Writes the contents of bytes-like objects to a file descriptor at a given offset.\n"
40174028"\n"
4018- "Write buffer to fd, starting at offset bytes from the beginning of\n"
4019- "the file. Returns the number of bytes writte. Does not change the\n"
4020- "current file offset." );
4029+ "Combines the functionality of writev() and pwrite(). All buffers must be a sequence\n"
4030+ "of bytes-like objects. Buffers are processed in array order. Entire contents of first\n"
4031+ "buffer is written before proceeding to second, and so on. The operating system may\n"
4032+ "set a limit (sysconf() value SC_IOV_MAX) on the number of buffers that can be used.\n"
4033+ "This function writes the contents of each object to the file descriptor and returns\n"
4034+ "the total number of bytes written.\n"
4035+ "\n"
4036+ "The flags argument contains a bitwise OR of zero or more of the following flags:\n"
4037+ "\n"
4038+ "- RWF_DSYNC\n"
4039+ "- RWF_SYNC\n"
4040+ "\n"
4041+ "Using non-zero flags requires Linux 4.7 or newer." );
40214042
40224043#define OS_PWRITEV_METHODDEF \
40234044 {"pwritev", (PyCFunction)os_pwritev, METH_FASTCALL, os_pwritev__doc__},
@@ -6507,4 +6528,4 @@ os_getrandom(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject
65076528#ifndef OS_GETRANDOM_METHODDEF
65086529 #define OS_GETRANDOM_METHODDEF
65096530#endif /* !defined(OS_GETRANDOM_METHODDEF) */
6510- /*[clinic end generated code: output=d50830cf566cb297 input=a9049054013a1b77]*/
6531+ /*[clinic end generated code: output=06ace805893aa10c input=a9049054013a1b77]*/
0 commit comments