Instead I should be able to read directly from the mmap file database field that value and wait on it if not the appropriate value.
Especially this part is of interest:
futex1 = &iaddr[0];
of the main function in the example located in the futex man page
The page I linked is also not part of the public API. It is however pretty small and mostly uses the libc crate which instead is public API, so you could take it as an example of what you need to do. The libc crate is mostly an interface to the C APIs, so the man page documentation you previously linked should also apply to it. The downside is that it is very unsafe to use.
That's a really neat crate I overlooked.
I've already created the C++->C->Rust binding, so the DB is still C++ and we will gradually move over Rust at a later stage.
But this is the crate we will be using for sure for future development.
I read the source code of this crate and would just warn users that the futex set the FUTEX_PRIVATE_FLAG so it is specific to a local process as the man explains https://www.man7.org/linux/man-pages/man2/futex.2.html