aboutsummaryrefslogtreecommitdiff
path: root/sys/sys
diff options
context:
space:
mode:
authorAlan Somers <asomers@FreeBSD.org>2021-01-03 04:25:05 +0000
committerAlan Somers <asomers@FreeBSD.org>2021-01-20 16:02:25 +0000
commit2247f48941743cab420394b5ff0fc65ec8c69a99 (patch)
treecdaf8be5e50707c92e0e2c46ee0289383c3d753b /sys/sys
parentb84d0aaa4e64fb95b105d0d38f6295fec7a82110 (diff)
downloadsrc-2247f48941743cab420394b5ff0fc65ec8c69a99.tar.gz
src-2247f48941743cab420394b5ff0fc65ec8c69a99.zip
aio: micro-optimize the lio_opcode assignments
This allows slightly more efficient opcode testing in-kernel. It is transparent to userland, except to applications that sneakily submit aio fsync or aio mlock operations via lio_listio, which has never been documented, requires the use of deliberately undefined constants (LIO_SYNC and LIO_MLOCK), and is arguably a bug. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D27942
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/aio.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/sys/aio.h b/sys/sys/aio.h
index ee928b8bf846..d3e03efa310e 100644
--- a/sys/sys/aio.h
+++ b/sys/sys/aio.h
@@ -44,11 +44,12 @@
#define LIO_WRITE 0x1
#define LIO_READ 0x2
#if defined(_KERNEL) || defined(_WANT_ALL_LIO_OPCODES)
-#define LIO_SYNC 0x3
-#define LIO_MLOCK 0x4
-#define LIO_WRITEV 0x5
-#define LIO_READV 0x6
-#define LIO_DSYNC 0x7
+#define LIO_VECTORED 0x4
+#define LIO_WRITEV (LIO_WRITE | LIO_VECTORED)
+#define LIO_READV (LIO_READ | LIO_VECTORED)
+#define LIO_SYNC 0x8
+#define LIO_DSYNC (0x10 | LIO_SYNC)
+#define LIO_MLOCK 0x20
#endif
/*