Skip to content

docs: split the README into integration, API and design docs - #7

Merged
aajll merged 1 commit into
masterfrom
6-docs-landing-page
Oct 14, 2026
Merged

aajll merged 1 commit into
masterfrom
6-docs-landing-page

Conversation

@aajll

@aajll aajll commented Oct 14, 2026

Copy link
Copy Markdown
Owner

Refs #6

Splits the README into a landing page and three documents in the shared primitives layout, adds a test that compiles every documented example, and brings CONTRIBUTING.md and AGENTS.md in line with the current tooling.

Routing

README section Destination
Tagline, Features README description (shortened)
Installation: subproject, installed dependency docs/integration.md
Project-level configuration docs/integration.md#configuration, rewritten: the replacement-header pattern does not work (see below)
Quick Start README quick start, compiled by the docs test and run (exit 0)
Building docs/integration.md#build-and-test
Configuration Macros table docs/api.md#configuration, as prose
Single-Include Override Dropped: a per-file SEQLOCK_COUNTER_TYPE define desynchronises the caller from the compiled library
Type Definitions, Typed API, Type-Erased Core docs/api.md
Use Cases docs/api.md#recipes (bounded read, per-channel cells, run-time size); the wider counter moves to Configuration
Notes table docs/design.md (progress, counter wrap, payload copy, backends) and docs/api.md#conventions

Findings recorded in the docs

  • Configuration override header. seqlock_conf.h and the old README describe placing a project config/seqlock_conf.h earlier on the include path. seqlock.h includes it with quotes, so the copy beside seqlock.h always wins. A probe consumer whose replacement header contained #error built cleanly. The docs now say configuration is by -D only. The header comment still describes the pattern; it is left for a code change.
  • Counter type mismatch. A caller built with -DSEQLOCK_COUNTER_TYPE=uint64_t against a library built with the default compiles and links. The docs state the rule and show top-level c_args, which a probe confirmed reach the subproject compile.
  • Uniprocessor backend. volatile does not order the non-volatile payload copy against the counter, and there is no check that the counter is accessed in one instruction. Both are documented as limits for the consumer; this is the backend the C2000 compiler selects.
  • Interrupt reader over a main-loop writer on one core: load never returns. Documented, with try_load as the recipe.

Checks

  • Full suite, ASan and UBSan, x86-64: 11/11, including seqlock docs examples.
  • Docs test falsified: changing max_retries to size_t in a documented prototype fails it; reverted.
  • mt and soak falsified: removing the reader's s1 == s2 comparison makes both fail on a mixed copy (test_seqlock_mt.c:65, test_seqlock_soak.c:76).
  • Native AArch64 (Cortex-A72, 4 KiB pages, 39-bit address space): release 10/10 and ThreadSanitizer 10/10. AddressSanitizer cannot start on a 39-bit address space, which docs/integration.md records.
  • misch run --baseline for the base configuration and both profiles: pass, unchanged.
  • scripts/format.sh: 12 files match. Relative links: 27 checked, 0 broken.

No source or header changes.

The README held the install guide, a configuration table, the API, use cases and a notes table, while the protocol, memory ordering and progress guarantees were spread across header comments and CONTRIBUTING.md. The README is now a landing page with a compiled quick start, and docs/design.md records the ordering argument, the uniprocessor backend's limits, progress, counter wrap and verification. A docs test compiles every C example, and CONTRIBUTING.md and AGENTS.md describe misch, scripts/format.sh and the current CI.

The integration guide states that SEQLOCK_COUNTER_TYPE and the backend macros must match between the library and its callers, and that a replacement seqlock_conf.h earlier on the include path is never used, because seqlock.h includes it with quotes.

Refs #6
@aajll aajll linked an issue Oct 14, 2026 that may be closed by this pull request
5 tasks
@aajll
aajll merged commit bb3a000 into master Oct 14, 2026
8 checks passed
@aajll
aajll deleted the 6-docs-landing-page branch October 14, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Split the README into integration, API and design docs

1 participant