io_uring_register_clock(3)
β¨ io_uring_register_clock β¨
ok so bestie, this one is a liburing manual page, and it's literally all about telling io_uring which clock to vibe with when it's out here waiting for event completions π°οΈπ
π NAME π
io_uring_register_clock β set the clock source for event waiting. yes that's it, that's the whole job, and it's iconic π
πΈ SYNOPSIS πΈ
#include <liburing.h>
int io_uring_register_clock(struct io_uring *ring,
struct io_uring_clock_register *arg);
π¦ DESCRIPTION π¦
okok so the io_uring_register_clock(3) function is the one you call to register which clock source io_uring should use when your app is out here waiting for event completions π«Ά
- the
ringargument should point at the ring in question (yk, the ring you're doing the thing with) - and the
argargument should be a pointer to astruct io_uring_clock_register
and like, the arg argument has to be actually filled in with the right info, no being lazy about it. here's what it looks like:
struct io_uring_clock_register {
__u32 clockid;
__u32 __resv[3];
};
the clockid field must contain the clock source, and the valid sources are, bestie, drumroll pls π₯:
CLOCK_MONOTONICβ a nonsettable system-wide clock that represents monotonic time. no cap, it just goes forward π«CLOCK_BOOTTIMEβ a nonsettable system-wide clock that is identical toCLOCK_MONOTONIC, except that it also icnludes any time that the system is suspended π΄ (so like, the nap time counts too)
if you want the full lore, go read clock_gettime(3), it has all the deets π
and the __resv fields? they must be filled with zeroes. literally zeros, nothing else, don't get cute with it π
Available since 6.12. so if you're on something older, sorry bestie, this is not your era yet π
β RETURN VALUE β
- on success,
io_uring_register_clock(3)returns0β slay, we love a zero π - on failure it returns
-errnoβ sad girl hours π
π SEE ALSO π
clock_gettime(3)io_uring_register(2)io_uring_wait_cqe(3)io_uring_wait_cqe_timeout(3)
and that's the whole page, periodt π this was liburing-2.8, dated Aug 18, 2024, straight out of the liburing Manual β mwah, go register a clock, you got this ππ
π¦ where this page comes from
- alpine 3.22: liburing-doc 2.9-r0 Β· LGPL-2.1-or-later OR MIT
- alpine 3.23: liburing-doc 2.12-r0 Β· LGPL-2.1-or-later OR MIT
- alpine 3.24: liburing-doc 2.14-r0 Β· LGPL-2.1-or-later OR MIT
- arch rolling: liburing 2.15-1 Β· GPL-2.0-only WITH Linux-syscall-note OR MIT AND LGPL-2.0-or-later AND MIT
- centos-stream 10: liburing-devel 2.12-1.el10 Β· (GPLv2 with exceptions and LGPLv2+) or MIT
- centos-stream 9: liburing-devel 2.12-1.el9 Β· (GPLv2 with exceptions and LGPLv2+) or MIT
- centos-stream 9: liburing-devel 2.12-1.el9 Β· (GPLv2 with exceptions and LGPLv2+) or MIT
- debian trixie: liburing-dev 2.9-1
- fedora 43: liburing-devel 2.9-2.fc43 Β· (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT)
- fedora 43: liburing-devel 2.9-2.fc43 Β· (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT)
- fedora 44: liburing-devel 2.13-2.fc44 Β· (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT)
- fedora 44: liburing-devel 2.13-2.fc44 Β· (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT)
- nixpkgs unstable: liburing 2.14
- opensuse-leap 16.0: liburing-devel 2.8-160000.3.1 Β· (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
- opensuse-leap 16.0: liburing-devel 2.8-160000.3.1 Β· (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
- opensuse-leap 16.0: liburing-devel 2.8-160000.3.1 Β· (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
- opensuse-leap 16.0: liburing-devel 2.8-160000.3.1 Β· (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
- ubuntu questing: liburing-dev 2.11-1
- ubuntu resolute: liburing-dev 2.14-1
- ubuntu stonking: liburing-dev 2.15-1
- π the page's license: LGPL-2.0-or-later
- Copyright (C) 2024 Jens Axboe <axboe@kernel.dk>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms