Appearance
aowlspt_inspoverlay.h
Source: abi/aowlspt_inspoverlay.h — 154 lines, 14 file-scope functions.
What this header owns
Reproduced verbatim from the header's own banner comment — these notes are frequently the only written record of why the subsystem is shaped the way it is.
text
aowlspt_inspoverlay.h -- the native backing for the F2 LIVE INSPECTOR OVERLAY.
WHAT THIS IS. A tiny, self-contained ring buffer of the live inspector's most
recent activity (the commands it ran and the answer lines it produced), plus a
published snapshot of its bound anchors. The inspector WRITES to it from
Unity's main thread as it runs a batch; the D3D11 overlay READS from it in
`Present` (a different thread) to draw the F2 panel. Nothing here detours,
resolves a name, calls into managed code, or allocates on any path -- every
buffer is a file-scope fixed array, every loop is bounded by a compile-time
constant, and the only OS calls are a CRITICAL_SECTION.
WHY A LOCK. There is exactly one writer (Unity thread, `aowl_io_push` /
`aowl_io_anchor_*`) and one reader (the render thread, `aowl_io_get` /
`aowl_io_anchor_get`). A CRITICAL_SECTION held for the length of a <=63-byte
memcpy is the simplest thing that is unambiguously correct: the reader can
never observe a half-overwritten line, and at human command rates the writer
is never meaningfully blocked. This lock is DEDICATED -- it is never the
inspector's own `aowl_insp_lock` -- so there is no lock-ordering relationship
with anything else in the host and therefore no way to invert one.
WHY 63 CHARS. `AOWL_REGION_TEXT_LEN` is 64, so a single overlay text command
carries at most 63 characters. Storing wider than the renderer can draw would
be a read-out that loses its right-hand column WITHOUT SAYING SO -- the exact
failure the inspector exists to avoid -- so a line is truncated to 63 here, at
the point of capture, and marked with a trailing '>' when it was cut. The full
untruncated answer is always in aowlspt-inspect-out.txt; this panel is a live
glance, not the transcript.Constants
AOWLSPT_INSPOVERLAY_HAOWL_IO_ANCHOR_NAOWL_IO_KIND_CMDAOWL_IO_KIND_EVENTAOWL_IO_KIND_RESULTAOWL_IO_LINEAOWL_IO_RING_N
Functions
| Signature | Line |
|---|---|
void aowl_io_ensure(void) | 49 |
void aowl_io_lock(void) | 59 |
void aowl_io_unlock(void) | 60 |
void aowl_io_copy63(char* dst, const char* s) | 70 |
void aowl_io_push(int32_t kind, const char* s) | 81 |
int32_t aowl_io_count_get(void) | 91 |
int64_t aowl_io_seq_get(void) | 92 |
int32_t aowl_io_get(int32_t j, char* out) | 97 |
void aowl_io_anchor_begin(void) | 121 |
void aowl_io_anchor_add(const char* s) | 126 |
void aowl_io_anchor_commit(void) | 134 |
int32_t aowl_io_anchor_count(void) | 139 |
int64_t aowl_io_anchor_seq_get(void) | 140 |
int32_t aowl_io_anchor_get(int32_t j, char* out) | 141 |

