template<typename value_t, typename server_t>
class dxd::promoted< value_t, server_t >
kernel-mode promoted value, mirroring dx::promoted's server/commit/notify shape
Same concept as dx::promoted (dx_value.h): a value that funnels every write through a pluggable server callback (validate/align/persist, then commit()), caches the committed value for reads, and notifies interested parties of every change - without dx::promoted's std::mutex/std::function/dx::listen, none of which are kernel-safe.
Two differences in kind, both forced by the kernel environment rather than a narrowing of the concept:
- server_t is a template parameter (the caller's lambda/functor type), not a std::function value - the same "inject arbitrary validation logic per
promoted member" pattern, resolved at compile time instead of via a type-erased, heap-allocating closure.
- notify is dxd::broadcast::signal() (wake registered listeners, who then re-read the value themselves), not dx::listen's std::function<void(value_t)> push - listeners here are as likely to be a dxd::event<dxd::user> bridging into a different process as an in-process callback, and a pushed value has no meaning across that boundary the way a signal-then-pull does.
No C++ exceptions (kernel code doesn't use them - see dxd/CLAUDE.md): the server callback is expected to call commit() itself when a value is accepted, exactly like dx::promoted's server contract already documents; a server that declines a change simply doesn't call commit(), leaving the previous value in place - there is no thrown rejection to report back to operator=()'s caller. Reentrancy (writing while a write is already in flight) is defended against by no-op'ing rather than throwing.