summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/kernel-features.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/kernel-features.h')
-rw-r--r--sysdeps/unix/sysv/linux/kernel-features.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
index 29afe27711..a640765b5c 100644
--- a/sysdeps/unix/sysv/linux/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/kernel-features.h
@@ -462,6 +462,13 @@
# define __ASSUME_SET_ROBUST_LIST 1
#endif
+/* Pessimistically assume that 2.6.18 introduced real handling of
+ large numbers of requests to readv and writev and that we don't
+ need a fallback. It likely worked for much longer. */
+#if __LINUX_KERNEL_VERSION >= 0x020612
+# define __ASSUME_COMPLETE_READV_WRITEV 1
+#endif
+
/* Support for PI futexes was added in 2.6.18. */
#if __LINUX_KERNEL_VERSION >= 0x020612
# define __ASSUME_FUTEX_LOCK_PI 1
@@ -522,3 +529,10 @@
#if __LINUX_KERNEL_VERSION >= 0x02061d
# define __ASSUME_FUTEX_CLOCK_REALTIME 1
#endif
+
+/* Support for preadv and pwritev was added in 2.6.30. */
+#if __LINUX_KERNEL_VERSION >= 0x02061e \
+ && (defined __i386__ || defined __x86_64__)
+# define __ASSUME_PREADV 1
+# define __ASSUME_PWRITEV 1
+#endif