benilla-re systems structs docs

OsTlsGetValue

function · unassigned

Address
0x436d80 · 35 bytes, up to 0x436da2
Meaning
Returns the TLS value, raising error 0x57 and returning 0 when GetLastError is set
Confidence
verified, proof one
Name from
the community database (idb)
Finding
core/threads#engine-thread-records

Finding: Engine thread records in core: process entry and threads

0x437060(name) registers the calling thread. Under the thread lock it counts the registration and allocates the TLS slot for the first; a record already in the slot is unlinked and freed. The new 0x189c-byte record holds the thread id at +0x08, a duplicate of the thread handle at +0x0c and the text name [id] at +0x181c, and goes in the TLS slot and at the end of the record list. 0x4371e0 undoes it: it empties the slot, zeroes the bound object's +0x08, closes the handle, unlinks and frees the record, and frees the slot when the count reaches 0.

The derivation is in the doc.

Callers 14

Callees 1

Calls and jumps by a bare address, from tables/calls.tsv.