Menu

- Learn
- Documentation
  - Language Reference
  - Library Reference
  - Command-line Reference
  - Feature Overview
  - Articles
- Downloads
- Packages
- Community
  - Blog
  - Orgs using D
  - Twitter
  - Calendar
  - Forums
  - IRC
  - Community Discord
  - Wiki
  - GitHub
  - Issues
  - Get involved
  - Contributors
  - Foundation
  - Security Team
  - Donate
  - Sponsors
- Resources
  - Tour
  - Books
  - Tutorials
  - Tools
  - Editors
  - IDEs
  - run.dlang.io
  - Visual D
  - Acknowledgments
  - D Style
  - Glossary
  - Sitemap

Search
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.

# core.sys.linux.io_uring

D header file for the io_uring interface. Available since Linux 5.1

struct `io_uring_sqe`;
  IO submission data structure (Submission Queue Entry)
  ubyte `opcode`;
    type of operation for this sqe
  ubyte `flags`;
    IOSQE_* flags
  ushort `ioprio`;
    ioprio for the request
  int `fd`;
    file descriptor to do IO on
  ulong `off`;
    offset into file
  ulong `addr`;
    pointer to buffer or iovecs
  uint `len`;
    buffer size or number of iovecs
  ushort `poll_events`;
    compatibility
  uint `poll32_events`;
    word-reversed for BE
  ulong `user_data`;
    data to be passed back at completion time
  ushort `buf_index`;
    index into fixed buffers, if used
    pack this to avoid bogus arm OABI complaints
  ushort `buf_group`;
    for grouped buffer selection
    pack this to avoid bogus arm OABI complaints
  ushort `personality`;
    personality to use, if used
`IOSQE_FIXED_FILE`
  use fixed fileset
`IOSQE_IO_DRAIN`
  issue after inflight IO
`IOSQE_IO_LINK`
  links next sqe
`IOSQE_IO_HARDLINK`
  like LINK, but stronger
`IOSQE_ASYNC`
  always go async
`IOSQE_BUFFER_SELECT`
  select buffer from sqe.buf_group
`IORING_SETUP_IOPOLL`
  io_context is polled
`IORING_SETUP_SQPOLL`
  SQ poll thread
`IORING_SETUP_SQ_AFF`
  sq_thread_cpu is valid
`IORING_SETUP_CQSIZE`
  app defines CQ size
`IORING_SETUP_CLAMP`
  clamp SQ/CQ ring sizes
`IORING_SETUP_ATTACH_WQ`
  attach to existing wq
`IORING_SETUP_R_DISABLED`
  start with ring disabled
struct `io_uring_cqe`;
  IO completion data structure (Completion Queue Entry)
  ulong `user_data`;
    submission passed back
  int `res`;
    result code for this event
enum uint `IORING_CQE_F_BUFFER`;
  If set, the upper 16 bits are the buffer ID
struct `io_sqring_offsets`;
  Filled with the offset for mmap(2)
`IORING_SQ_NEED_WAKEUP`
  needs io_uring_enter wakeup
`IORING_SQ_CQ_OVERFLOW`
  CQ ring is overflown
`IORING_CQ_EVENTFD_DISABLED`
  disable eventfd notifications
struct `io_uring_params`;
  Passed in for io_uring_setup(2)
`IORING_RESTRICTION_REGISTER_OP`
  Allow an io_uring_register(2) opcode
`IORING_RESTRICTION_SQE_OP`
  Allow an sqe opcode
`IORING_RESTRICTION_SQE_FLAGS_ALLOWED`
  Allow sqe flags
`IORING_RESTRICTION_SQE_FLAGS_REQUIRED`
  Require sqe flags (these flags must be set on each submission)

Copyright © 1999-2022 by the D Language Foundation | Page generated by Ddoc on Thu Dec 15 17:30:10 2022