SDL Introducing Async I/O APIs - Backed By IO_uring On Linux

Written by Michael Larabel in Linux Gaming on 4 December 2024 at 05:45 AM EST. 3 Comments
LINUX GAMING
Longtime Linux game porter Ryan Gordon has introduced initial asynchronous I/O APIs for the in-development SDL3 library. On Linux these async I/O APIs allow making use of the modern kernel IO_uring functionality.

The Simple DirectMedia Library provides for many hardware/software abstractions across platforms and primarily used by cross-platform games as well as by other software. The newest addition to SDL is having a universal async I/O API. Ryan Gordon explained in the pull request to upstream SDL:
"This is still in-progress, but I've been heads-down on this for awhile, so I'm putting it in a draft PR.

This implements an async i/o API, and a "generic" backend that implements it with a pool of SDL threads that can block on synchronous SDL_IOStreams. This is likely "good enough" for most things, and it's usable on everything but single-threaded Emscripten builds."

Aside from the common interface and a generic back-end implementation, for Linux there is IO_uring support underneath and on Microsoft Windows IoRing support.

sdl_liburing option


See more details via the discussion over introducing async I/O APIs for SDL.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week