registered-files.dhover×172all
#!/usr/bin/env dub
/+ dub.sdl:
    name "io_uring_registered_files"
    dependency "during" version="~>0.5.0"
    platforms "linux"
    targetPath "build"
+/
/**
 * `io_uring` — registered files + `IOSQE_FIXED_FILE` (Linux 5.1).
 *
 * One of the original 5.1 features: `IORING_REGISTER_FILES` lets a ring
 * pre-register a table of file descriptors with the kernel. Submissions then
 * address a file by its *table index* instead of a raw fd, with the
 * `IOSQE_FIXED_FILE` flag set on the SQE.
 *
 * Why it matters: for every plain (non-fixed) op the kernel must look the fd up
 * in the process fd table and bump/drop the file's reference count on each
 * submit/complete. A registered file is grabbed once at registration time and
 * held for the life of the table, so per-op submission skips that fget/fput
 * dance entirely — a measurable win for high-IOPS workloads that hammer the
 * same descriptors.
 *
 * This program:
 *   1. creates a temp file (libc) and writes a known 256-byte pattern,
 *   2. reopens it read-only and registers it as fixed-file table index 0,
 *   3. submits a `prepRead` whose `fd` argument is the *index* 0, with
 *      `SubmissionEntryFlags.FIXED_FILE` set, then verifies the bytes read back
 *      match the pattern,
 *   4. unregisters the table.
 *
 * Companion to the io_uring chronology:
 * see docs/research/async-io/io-uring/timeline.md § "5.1 — The introduction".
 *
 * Run with: `dub run --single registered-files.d`
 *
 * Portability: if the running kernel has no `io_uring` (too old, or blocked by a
 * seccomp/container policy), the program prints a `SKIP:` line and exits 0. The
 * fixed-file table itself dates from the 5.1 introduction, so any kernel new
 * enough to run io_uring at all supports it.
 */
module 
(module) io_uring_registered_files

io_uring — registered files + IOSQE_FIXED_FILE (Linux 5.1).

One of the original 5.1 features: IORING_REGISTER_FILES lets a ring pre-register a table of file descriptors with the kernel. Submissions then address a file by its table index instead of a raw fd, with the IOSQE_FIXED_FILE flag set on the SQE.

Why it matters: for every plain (non-fixed) op the kernel must look the fd up in the process fd table and bump/drop the file's reference count on each submit/complete. A registered file is grabbed once at registration time and held for the life of the table, so per-op submission skips that fget/fput dance entirely — a measurable win for high-IOPS workloads that hammer the same descriptors.

This program:

  1. creates a temp file (libc) and writes a known 256-byte pattern,

  2. reopens it read-only and registers it as fixed-file table index 0,

  3. submits a prepRead whose fd argument is the index 0, with SubmissionEntryFlags.FIXED_FILE set, then verifies the bytes read back match the pattern,

  4. unregisters the table.

Companion to the io_uring chronology: see docs/research/async-io/io-uring/timeline.md § "5.1 — The introduction".

Run with: dub run --single registered-files.d

Portability

if the running kernel has no io_uring (too old, or blocked by a seccomp/container policy), the program prints a SKIP: line and exits 0. The fixed-file table itself dates from the 5.1 introduction, so any kernel new enough to run io_uring at all supports it.

io_uring_registered_files
;
import
(module) during

Simple idiomatic dlang wrapper around linux io_uring (see: https://kernel.dk/io_uring.pdf) asynchronous API.

during
;
import
(package) core
core
.
(package) core.stdc
stdc
.
(module) core.stdc.stdlib

D header file for C99.

pubs.opengroup.org/onlinepubs/009695399/basedefs/stdlib.h.html, stdlib.h

Source

core/stdc/stdlib.d

@copyrightCopyright Sean Kelly 2005 - 2014.@licenseDistributed under the Boost Software License 1.0. (See accompanying file LICENSE)@authorsSean Kelly@standardsISO/IEC 9899:1999 (E)
stdlib
:
(alias) io_uring_registered_files.malloc = void* core.stdc.stdlib.malloc(ulong size) nothrow @nogc
malloc
,
(alias) io_uring_registered_files.free = void core.stdc.stdlib.free(void* ptr) nothrow @nogc
free
;
import
(package) core
core
.
(package) core.sys
sys
.
(package) core.sys.linux
linux
.
(module) core.sys.linux.errno

D header file for GNU/Linux

glibc stdlib/errno.h

errno
:
(alias constant) io_uring_registered_files.EINVAL = int core.stdc.errno.EINVAL = 22
EINVAL
,
(alias constant) io_uring_registered_files.EOPNOTSUPP = int core.stdc.errno.EOPNOTSUPP = 95
EOPNOTSUPP
;
import
(package) core
core
.
(package) core.sys
sys
.
(package) core.sys.linux
linux
.
(module) core.sys.linux.fcntl
fcntl
: open,
(alias constant) io_uring_registered_files.O_CREAT = int core.sys.posix.fcntl.O_CREAT = 64
O_CREAT
,
(alias constant) io_uring_registered_files.O_RDONLY = int core.sys.posix.fcntl.O_RDONLY = 0
O_RDONLY
,
(alias constant) io_uring_registered_files.O_WRONLY = int core.sys.posix.fcntl.O_WRONLY = 1
O_WRONLY
,
(alias constant) io_uring_registered_files.O_TRUNC = int core.sys.posix.fcntl.O_TRUNC = 512
O_TRUNC
;
import
(package) core
core
.
(package) core.sys
sys
.
(package) core.sys.posix
posix
.
(module) core.sys.posix.unistd

D header file for POSIX.

@copyrightCopyright Sean Kelly 2005 - 2009.@licenseBoost License 1.0.@authorsSean Kelly@standardsThe Open Group Base Specifications Issue 8, IEEE Std 1003.1, 2024 Edition
unistd
:
(alias) io_uring_registered_files.close = int core.sys.posix.unistd.close(int) nothrow @nogc @trusted
close
,
(alias) io_uring_registered_files.unlink = int core.sys.posix.unistd.unlink(scope const(char*)) nothrow @nogc
unlink
,
(alias) io_uring_registered_files.write = long core.sys.posix.unistd.write(int, scope const(void*), ulong) nothrow @nogc
write
;
import
(package) std
std
.
(module) std.stdio
Category Symbols
File handles _popen File isFileHandle openNetwork stderr stdin stdout
Reading chunks lines readf readfln readln
Writing toFile write writef writefln writeln
Misc KeepTerminator LockType StdioException

Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio is publically imported when importing std.stdio.

There are three layers of I/O:

  1. The lowest layer is the operating system layer. The two main schemes are Windows and Posix.

  2. C's stdio.h which unifies the two operating system schemes.

  3. std.stdio, this module, unifies the various stdio.h implementations into a high level package for D programs.

Source

std/stdio.d

@copyrightCopyright The D Language Foundation 2007-.@licenseBoost License 1.0.@authorsWalter Bright, Andrei Alexandrescu, Alex Rønne Petersen
stdio
:
(alias template) io_uring_registered_files.writefln = std.stdio.writefln(alias fmt, A...)(A args) if (isSomeString!(typeof(fmt)))

Equivalent to writef(fmt, args, '\n').

writefln
, stderr;
import
(package) std
std
.
(module) std.string

String handling functions.

Category Functions
Searching
column
indexOf
indexOfAny
indexOfNeither
lastIndexOf
lastIndexOfAny
lastIndexOfNeither
Comparison
isNumeric
Mutation
capitalize
Pruning and Filling
center
chomp
chompPrefix
chop
detabber
detab
entab
entabber
leftJustify
outdent
rightJustify
strip
stripLeft
stripRight
wrap
Substitution
abbrev
soundex
soundexer
succ
tr
translate
Miscellaneous
assumeUTF
fromStringz
lineSplitter
representation
splitLines
toStringz
Objects of types string, wstring, and dstring are value types
and cannot be mutated element-by-element. For using mutation during building
strings, use char[], wchar[], or dchar[]. The xxxstring
types are preferable because they don't exhibit undesired aliasing, thus
making code more robust.

The following functions are publicly imported:

Module Functions
Publicly imported functions
std.algorithm
cmp, std,algorithm,comparison
count, std,algorithm,searching
endsWith, std,algorithm,searching
startsWith, std,algorithm,searching
std.array
join, std,array
replace, std,array
replaceInPlace, std,array
split, std,array
empty, std,array
std.format
format, std,format
sformat, std,format
std.uni
icmp, std,uni
toLower, std,uni
toLowerInPlace, std,uni
toUpper, std,uni
toUpperInPlace, std,uni
There is a rich set of functions for string handling defined in other modules.
Functions related to Unicode and ASCII are found in std.uni
and std.ascii, respectively. Other functions that have a
wider generality than just strings can be found in std.algorithm
and std.range.

Source

std/string.d

@seestd.algorithm and std.range for generic range algorithms , std.ascii for functions that work with ASCII strings , std.uni for functions that work with unicode strings@copyrightCopyright The D Language Foundation 2007-.@licenseBoost License 1.0.@authorsWalter Bright, Andrei Alexandrescu, Jonathan M Davis, and David L. 'SpottedTiger' Davis
string
:
(alias) io_uring_registered_files.toStringz = immutable(char)* std.string.toStringz(scope const(char)[] s) pure nothrow @trusted
@params A D-style string.@returns

A C-style null-terminated string equivalent to s. s must not contain embedded '\0''s as any C function will treat the first '\0' that it sees as the end of the string. If s.empty is true, then a string containing only '\0' is returned.

Important Note: When passing a char* to a C function, and the C function keeps it around for any reason, make sure that you keep a reference to it in your D code. Otherwise, it may become invalid during a garbage collection cycle and cause a nasty bug when the C code tries to use it.

toStringz
;
int
int D main()
main
()
{ enum ulong
(constant) ulong io_uring_registered_files.main.cookie = 1364262913LU
cookie
= 0x5151_0001;
// A deterministic 256-byte pattern (0,1,2,...,255) we will write and then // read back through the fixed-file table. ubyte[256]
(local variable) ubyte[256] pattern
pattern
;
foreach (
(parameter) ulong i
i
, ref
(parameter) ubyte b
b
;
(local variable) ubyte[256] pattern
pattern
)
(local variable) ubyte b
b
= cast(ubyte)
(local variable) ulong i
i
;
(struct) during.Uring

Main entry point to work with io_uring.

It hides SubmissionQueue and CompletionQueue behind standard range interface. We put in SubmissionEntry entries and take out CompletionEntry entries.

Use predefined prepXX methods to fill required fields of SubmissionEntry before put or during putWith.

Note

prepXX functions doesn't touch previous entry state, just fills in operation properties. This is because for less error prone interface it is cleared automatically when prepared using putWith. So when using on own SubmissionEntry (outside submission queue), that would be added to the submission queue using put, be sure its cleared if it's reused for multiple operations.

Uring
(local variable) during.Uring io
io
;
const
(local variable) const(int) setupRet
setupRet
=
(local variable) during.Uring io
io
.
int during.setup(ref during.Uring uring, uint entries = 128u, during.io_uring.SetupFlags flags = SetupFlags.NONE) nothrow @nogc @safe

Setup new instance of io_uring into provided Uring structure.

@paramuring Uring structure to be initialized (must not be already initialized)@paramentries Number of entries to initialize uring with@paramflags SetupFlags to use to initialize uring.@returnsOn succes it returns 0, -errno otherwise.
setup
(8);
if (
(local variable) const(int) setupRet
setupRet
< 0)
{
void std.stdio.writefln!(char, const(int))(in char[] fmt, const(int) __param_1) @safe

Equivalent to writef(fmt, args, '\n').

writefln
("SKIP: io_uring_setup failed (errno %d) — io_uring unavailable on this host", -
(local variable) const(int) setupRet
setupRet
);
return 0; } // --- 1. Create a temp file and write the known pattern via plain libc. --- const char*
(local variable) const(char*) path
path
=
immutable(char)* std.string.toStringz(scope const(char)[] s) pure nothrow @trusted

Examples

import core.stdc.string : strlen;
import std.conv : to;

auto p = toStringz("foo");
assert(strlen(p) == 3);
const(char)[] foo = "abbzxyzzy";
p = toStringz(foo[3 .. 5]);
assert(strlen(p) == 2);

string test = "";
p = toStringz(test);
assert(*p == 0);

test = "\0";
p = toStringz(test);
assert(*p == 0);

test = "foo\0";
p = toStringz(test);
assert(p[0] == 'f' && p[1] == 'o' && p[2] == 'o' && p[3] == 0);

const string test2 = "";
p = toStringz(test2);
assert(*p == 0);

assert(toStringz([]) is toStringz(""));
@params A D-style string.@returns

A C-style null-terminated string equivalent to s. s must not contain embedded '\0''s as any C function will treat the first '\0' that it sees as the end of the string. If ``s.empty is true, then a string containing only '\0' is returned.

Important Note: When passing a char* to a C function, and the C function keeps it around for any reason, make sure that you keep a reference to it in your D code. Otherwise, it may become invalid during a garbage collection cycle and cause a nasty bug when the C code tries to use it.

toStringz
("/tmp/io_uring_registered_files.tmp");
{ const
(local variable) const(int) wfd
wfd
= open(
int core.sys.posix.fcntl.open64(scope const(char*), int, ...) nothrow @nogc
path
,
(constant) int core.sys.posix.fcntl.O_CREAT = 64
O_CREAT
|
(constant) int core.sys.posix.fcntl.O_WRONLY = 1
O_WRONLY
|
(constant) int core.sys.posix.fcntl.O_TRUNC = 512
O_TRUNC
,
(template instance) io_uring_registered_files.octal!600
octal
!600);
if (
(local variable) const(int) wfd
wfd
< 0)
{ stderr.
std.stdio.File std.stdio.makeGlobal!"core.stdc.stdio.stderr"() nothrow @nogc @property ref @system
writefln
("could not create temp file");
return 1; } const
(local variable) const(long) wr
wr
=
long core.sys.posix.unistd.write(int, scope const(void*), ulong) nothrow @nogc
write
(
(local variable) const(int) wfd
wfd
, &
(local variable) ubyte[256] pattern
pattern
[0],
(local variable) ubyte[256] pattern
pattern
.
(constant) ulong ubyte[256].length = 256LU
length
);
int core.sys.posix.unistd.close(int) nothrow @nogc @trusted
close
(
(local variable) const(int) wfd
wfd
);
if (
(local variable) const(long) wr
wr
!=
(local variable) ubyte[256] pattern
pattern
.
(constant) ulong ubyte[256].length = 256LU
length
)
{ stderr.
std.stdio.File std.stdio.makeGlobal!"core.stdc.stdio.stderr"() nothrow @nogc @property ref @system
writefln
("short write to temp file: %d",
(local variable) const(long) wr
wr
);
int core.sys.posix.unistd.unlink(scope const(char*)) nothrow @nogc
unlink
(
(local variable) const(char*) path
path
);
return 1; } } scope (exit)
int core.sys.posix.unistd.unlink(scope const(char*)) nothrow @nogc
unlink
(
(local variable) const(char*) path
path
);
// --- 2. Reopen read-only and register it as fixed-file table index 0. --- const
(local variable) const(int) rfd
rfd
= open(
int core.sys.posix.fcntl.open64(scope const(char*), int, ...) nothrow @nogc
path
,
(constant) int core.sys.posix.fcntl.O_RDONLY = 0
O_RDONLY
, 0);
if (
(local variable) const(int) rfd
rfd
< 0)
{ stderr.
std.stdio.File std.stdio.makeGlobal!"core.stdc.stdio.stderr"() nothrow @nogc @property ref @system
writefln
("could not reopen temp file");
return 1; } scope (exit)
int core.sys.posix.unistd.close(int) nothrow @nogc @trusted
close
(
(local variable) const(int) rfd
rfd
);
const int[1]
(local variable) const(int[1]) tableFds
tableFds
= [
(local variable) const(int) rfd
rfd
];
const
(local variable) const(int) regRet
regRet
=
(local variable) during.Uring io
io
.
int during.Uring.registerFiles(const(int)[] fds) nothrow @nogc

Register files for I/O.

To make use of the registered files, the IOSQE_FIXED_FILE flag must be set in the flags member of the SubmissionEntry, and the fd member is set to the index of the file in the file descriptor array.

Files are automatically unregistered when the io_uring instance is torn down. An application need only unregister if it wishes to register a new set of fds.

Use -1 as a file descriptor to mark it as reserved in the array.*

@paramfds array of file descriptors to be registered@returnsOn success, returns 0. On error, -errno is returned.
registerFiles
(
(local variable) const(int[1]) tableFds
tableFds
[]);
if (
(local variable) const(int) regRet
regRet
== -
(constant) int core.stdc.errno.EINVAL = 22
EINVAL
||
(local variable) const(int) regRet
regRet
== -
(constant) int core.stdc.errno.EOPNOTSUPP = 95
EOPNOTSUPP
)
{ // Defensive: fixed files exist since 5.1, so this should not happen on a // kernel that completed io_uring_setup, but stay green if it ever does.
void std.stdio.writefln!(char, const(int))(in char[] fmt, const(int) __param_1) @safe

Equivalent to writef(fmt, args, '\n').

writefln
("SKIP: IORING_REGISTER_FILES unsupported (errno %d)", -
(local variable) const(int) regRet
regRet
);
return 0; } if (
(local variable) const(int) regRet
regRet
!= 0)
{ stderr.
std.stdio.File std.stdio.makeGlobal!"core.stdc.stdio.stderr"() nothrow @nogc @property ref @system
writefln
("registerFiles failed: errno %d", -
(local variable) const(int) regRet
regRet
);
return 1; } // --- 3. Read the file BY TABLE INDEX, not by raw fd. --- // The buffer the kernel fills lives in process memory; allocate it off-GC so // the example stays self-contained and pointer-stable for the duration. enum
(alias) object.size_t = ulong
size_t
(constant) ulong io_uring_registered_files.main.len = 256LU
len
=
(local variable) ubyte[256] pattern
pattern
.
(constant) ulong ubyte[256].length = 256LU
length
;
auto
(local variable) ubyte* bufPtr
bufPtr
= cast(ubyte*)
void* core.stdc.stdlib.malloc(ulong size) nothrow @nogc
malloc
(
(constant) ulong io_uring_registered_files.main.len = 256LU
len
);
if (
(local variable) ubyte* bufPtr
bufPtr
is null)
{ stderr.
std.stdio.File std.stdio.makeGlobal!"core.stdc.stdio.stderr"() nothrow @nogc @property ref @system
writefln
("malloc failed");
(local variable) during.Uring io
io
.
int during.Uring.unregisterFiles() nothrow @nogc @trusted

All previously registered files associated with the io_uring instance will be unregistered.

Files are automatically unregistered when the io_uring instance is torn down. An application need only unregister if it wishes to register a new set of fds.

@returnsOn success, returns 0. On error, -errno is returned.
unregisterFiles
();
return 1; } scope (exit)
void core.stdc.stdlib.free(void* ptr) nothrow @nogc
free
(
(local variable) ubyte* bufPtr
bufPtr
);
ubyte[]
(local variable) ubyte[] readBuf
readBuf
=
(local variable) ubyte* bufPtr
bufPtr
[0 ..
(constant) ulong io_uring_registered_files.main.len = 256LU
len
];
(local variable) ubyte[] readBuf
readBuf
[] = 0;
(local variable) during.Uring io
io
.putWith!((ref SubmissionEntry e, ubyte[] dst) {
// NOTE: the first arg to prepRead is `0` — the *index* into the // registered-file table, not `rfd`. FIXED_FILE tells the kernel to // interpret it that way. e.prepRead(0, dst, 0); e.flags |= SubmissionEntryFlags.FIXED_FILE; e.user_data = cookie; })(
during.Uring during.Uring.putWith!(function (ref during.io_uring.SubmissionEntry e, ubyte[] dst) nothrow @nogc @safe { prepRead(e, 0, dst, 0L); cast(int)e.flags |= 1; e.user_data = 1364262913LU; } , ubyte[])(ref ubyte[] __param_0) nothrow @nogc return ref @safe

Adds new entry to the SubmissionQueue.

Note that this just adds entry to the queue and doesn't advance the tail marker kernel sees. For that finishSq() is needed to be called next.

Also note that to actually enter new entries to kernel, it's needed to call submit().

@paramFN Function to fill next entry in queue by ref (should be faster). It is expected to be in a form of void function(ARGS)(ref SubmissionEntry, auto ref ARGS). Note that in this case queue entry is cleaned first before function is called.@paramentry Custom built SubmissionEntry to be posted as is. Note that in this case it is copied whole over one in the SubmissionQueue.@paramargs Optional arguments passed to the function@returnsreference to Uring structure so it's possible to chain multiple commands.
readBuf
);
const
(local variable) const(int) submitted
submitted
=
(local variable) during.Uring io
io
.
int during.Uring.submit(uint want) nothrow @nogc @safe

Submits qued SubmissionEntry to be processed by kernel.

@paramwant number of CompletionEntries to wait for. If 0, this just submits queued entries and returns. If > 0, it blocks until at least wanted number of entries were completed.@paramsig See io_uring_enter(2) man page@returnsNumber of submitted entries on success, -errno on error
submit
(1);
if (
(local variable) const(int) submitted
submitted
< 0)
{ stderr.
std.stdio.File std.stdio.makeGlobal!"core.stdc.stdio.stderr"() nothrow @nogc @property ref @system
writefln
("submit failed: errno %d", -
(local variable) const(int) submitted
submitted
);
(local variable) during.Uring io
io
.
int during.Uring.unregisterFiles() nothrow @nogc @trusted

All previously registered files associated with the io_uring instance will be unregistered.

Files are automatically unregistered when the io_uring instance is torn down. An application need only unregister if it wishes to register a new set of fds.

@returnsOn success, returns 0. On error, -errno is returned.
unregisterFiles
();
return 1; }
(local variable) during.Uring io
io
.
int during.Uring.wait(uint want = 1u) nothrow @nogc

Simmilar to submit but with this method we just wait for required number of CompletionEntries.

@returns0 on success, -errno on error
wait
(1);
const
(local variable) const(int) res
res
=
(local variable) during.Uring io
io
.
during.io_uring.CompletionEntry during.Uring.front() pure nothrow @nogc return ref @safe

Get first CompletionEntry from cq ring

front
.
(field) int during.io_uring.CompletionEntry.res

result code for this event

res
;
const
(local variable) const(ulong) echoed
echoed
=
(local variable) during.Uring io
io
.
during.io_uring.CompletionEntry during.Uring.front() pure nothrow @nogc return ref @safe

Get first CompletionEntry from cq ring

front
.
(field) ulong during.io_uring.CompletionEntry.user_data

sqe->data submission passed back

user_data
;
(local variable) during.Uring io
io
.
void during.Uring.popFront() pure nothrow @nogc @safe

Move to next CompletionEntry

popFront
();
// --- 4. Unregister the table (kernel drops its single held reference). --- const
(local variable) const(int) unregRet
unregRet
=
(local variable) during.Uring io
io
.
int during.Uring.unregisterFiles() nothrow @nogc @trusted

All previously registered files associated with the io_uring instance will be unregistered.

Files are automatically unregistered when the io_uring instance is torn down. An application need only unregister if it wishes to register a new set of fds.

@returnsOn success, returns 0. On error, -errno is returned.
unregisterFiles
();
if (
(local variable) const(int) unregRet
unregRet
!= 0)
{ stderr.
std.stdio.File std.stdio.makeGlobal!"core.stdc.stdio.stderr"() nothrow @nogc @property ref @system
writefln
("unregisterFiles failed: errno %d", -
(local variable) const(int) unregRet
unregRet
);
return 1; } // Validate the fixed-file read. if (
(local variable) const(int) res
res
< 0)
{ stderr.
std.stdio.File std.stdio.makeGlobal!"core.stdc.stdio.stderr"() nothrow @nogc @property ref @system
writefln
("fixed-file read failed: errno %d", -
(local variable) const(int) res
res
);
return 1; } if (
(local variable) const(ulong) echoed
echoed
!=
(constant) ulong io_uring_registered_files.main.cookie = 1364262913LU
cookie
)
{ stderr.
std.stdio.File std.stdio.makeGlobal!"core.stdc.stdio.stderr"() nothrow @nogc @property ref @system
writefln
("user_data mismatch: expected 0x%X, got 0x%X",
(constant) ulong io_uring_registered_files.main.cookie = 1364262913LU
cookie
,
(local variable) const(ulong) echoed
echoed
);
return 1; } if (
(local variable) const(int) res
res
!= cast(int)
(constant) ulong io_uring_registered_files.main.len = 256LU
len
||
(local variable) ubyte[] readBuf
readBuf
[] !=
(local variable) ubyte[256] pattern
pattern
[])
{ stderr.
std.stdio.File std.stdio.makeGlobal!"core.stdc.stdio.stderr"() nothrow @nogc @property ref @system
writefln
("content mismatch: read %d bytes, pattern check failed",
(local variable) const(int) res
res
);
return 1; }
void std.stdio.writefln!(char, const(int))(in char[] fmt, const(int) __param_1) @safe

Equivalent to writef(fmt, args, '\n').

writefln
("ok: read %d bytes via fixed-file table index 0 (IOSQE_FIXED_FILE), pattern verified",
(local variable) const(int) res
res
);
return 0; } /// Compile-time octal literal helper (D dropped the `0NNN` octal syntax). private enum
(constant) int io_uring_registered_files.octal!600 = 384

Compile-time octal literal helper (D dropped the 0NNN octal syntax).

octal
(int n) = {
int
(local variable) int v
v
= 0,
(local variable) int mul
mul
= 1,
(local variable) int x
x
=
(constant) int io_uring_registered_files.n = 600
n
;
while (
(local variable) int x
x
> 0) {
(local variable) int v
v
+= (
(local variable) int x
x
% 10) *
(local variable) int mul
mul
;
(local variable) int mul
mul
*= 8;
(local variable) int x
x
/= 10; }
return
(local variable) int v
v
;
}();