benilla-re systems structs docs

s_contextTableLocks

global · core

Address
0xcf7700 · 96 bytes, up to 0xcf775f
Type
uint8_t[96]
Meaning
Holds the read-write locks of the context table's eight buckets
Confidence
verified, proof one
Finding
core/loop#contexts

Finding: Contexts in core: the frame loop

A context is a 0x214-byte object: a lock at +0x10, run state +0x2c, a heap node +0x30 whose key +0x3c is the due time, the last tick time +0x40, flags +0x44, the idle time +0x48 and +0x4c, a load cost +0x50 and +0x54, 29 handler lists from +0x5c, and the message, input, timer and thread state after them. For the client's context the constructor stores: run state 0, last tick = now, flags 2 (interactive), idle time 1 ms in both fields, cost 1000 in both, and gives it a handle in the context table.

The derivation is in the doc.