]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
aio: micro-optimize the lio_opcode assignments
authorAlan Somers <asomers@FreeBSD.org>
Sun, 3 Jan 2021 04:25:05 +0000 (21:25 -0700)
committerAlan Somers <asomers@FreeBSD.org>
Wed, 20 Jan 2021 16:02:25 +0000 (09:02 -0700)
commit2247f48941743cab420394b5ff0fc65ec8c69a99
treecdaf8be5e50707c92e0e2c46ee0289383c3d753b
parentb84d0aaa4e64fb95b105d0d38f6295fec7a82110
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
sys/kern/sys_socket.c
sys/kern/vfs_aio.c
sys/sys/aio.h