MMgr v2.3.0
Zero-heap memory manager in C11. One borrowed buffer, carved by asserted offset.
Loading...
Searching...
No Matches
praet_iudex.h
Go to the documentation of this file.
1/* MMgr - Copyright (C) 2026 Douglas Quigg (dstroy0) <dquigg123@gmail.com>
2 * SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Commercial OR LicenseRef-Educational
3 *
4 * Every use falls under AGPL-3.0-or-later unless you hold explicit permission, which is either a
5 * negotiated commercial licensing contract or an educator's license issued to you personally.
6 */
7/**
8 * @file praet_iudex.h
9 * @brief Read after every knob reported, and the single place a configuration stops the build.
10 * @author dstroy0 (Douglas Quigg) <dquigg123@gmail.com>
11 * @date 2026-09-01
12 *
13 * @note Included last, after praet_praefinitum.h and embed_clock.h both had their say. Each of them
14 * gives every unset knob a default, a warning that names it, and a flag. This reads the flags.
15 * @note Why the stop is here and not at each knob: an #error halts its translation unit where it
16 * is. A build with four knobs unset would report the first, get a fix, then report the
17 * second. That is four rounds to learn four facts that were all knowable on the first. A warning
18 * at each knob and one stop at the end passes the whole list over together.
19 * @note There is no list in the message below, and there cannot be. The preprocessor has no way to
20 * assemble one. The warnings above are the list, one line each, and this says to go read them.
21 * @warning Out entirely where MMGR_ACCEPT_DEFAULTS exists. The warnings still are and are
22 * still the report; what the define changes is whether the build continues past it.
23 */
24#ifndef MMGR_PRAET_IUDEX_H
25#define MMGR_PRAET_IUDEX_H
26
27/** @addtogroup mod_praet
28 * @{ */
29
30#include "embed_clock.h"
32
33#if !defined(MMGR_ACCEPT_DEFAULTS)
34
35#if defined(PRAET_UNSET_CHANNELS) || defined(PRAET_UNSET_SETTLE_MICROS) || defined(PRAET_UNSET_KEEPALIVE_MICROS) || \
36 defined(PRAET_UNSET_RECOVERY) || defined(EMBED_UNSET_CLOCK_HZ) || defined(EMBED_UNSET_CLOCK_SOURCE) || \
37 defined(EMBED_UNSET_CLOCK_CORE)
38#error \
39 "This build did not declare every knob this module reads. Each one that took a library default is named in a warning above this line, with the value it took and what to set it to. Set them, or define MMGR_ACCEPT_DEFAULTS to build on the defaults and retain the warnings as the record of which ones you took."
40#endif
41
42#endif
43
44/** @} */
45
46#endif
Every knob this module reads, what it takes when the caller did not set it, and the warning that says...