.. versionadded:: 3.15
+.. data:: RWF_ATOMIC
+
+ Write data atomically. Requires alignment to the device's atomic write unit.
+
+ .. availability:: Linux >= 6.11
+
+ .. versionadded:: next
+
+
.. function:: ptsname(fd, /)
Return the name of the slave pseudo-terminal device associated with the
- :data:`RWF_SYNC`
- :data:`RWF_APPEND`
- :data:`RWF_DONTCACHE`
+ - :data:`RWF_ATOMIC`
Return the total number of bytes actually written.
"- RWF_SYNC\n"
"- RWF_APPEND\n"
"- RWF_DONTCACHE\n"
+"- RWF_ATOMIC\n"
"\n"
"Using non-zero flags requires Linux 4.7 or newer.");
#ifndef OS__EMSCRIPTEN_LOG_METHODDEF
#define OS__EMSCRIPTEN_LOG_METHODDEF
#endif /* !defined(OS__EMSCRIPTEN_LOG_METHODDEF) */
-/*[clinic end generated code: output=82f60940338c70e4 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=5fd2aeb6ba9a5df8 input=a9049054013a1b77]*/
- RWF_SYNC
- RWF_APPEND
- RWF_DONTCACHE
+- RWF_ATOMIC
Using non-zero flags requires Linux 4.7 or newer.
[clinic start generated code]*/
static Py_ssize_t
os_pwritev_impl(PyObject *module, int fd, PyObject *buffers, Py_off_t offset,
int flags)
-/*[clinic end generated code: output=e3dd3e9d11a6a5c7 input=664a67626d485665]*/
+/*[clinic end generated code: output=e3dd3e9d11a6a5c7 input=7de72245873f56bf]*/
{
Py_ssize_t cnt;
Py_ssize_t result;
#ifdef RWF_DONTCACHE
if (PyModule_AddIntConstant(m, "RWF_DONTCACHE", RWF_DONTCACHE)) return -1;
#endif
+#ifdef RWF_ATOMIC
+ if (PyModule_AddIntConstant(m, "RWF_ATOMIC", RWF_ATOMIC)) return -1;
+#endif
#ifdef RWF_APPEND
if (PyModule_AddIntConstant(m, "RWF_APPEND", RWF_APPEND)) return -1;
#endif