So many compiler errors after the most recent astrid IPC refactor, but they’re mostly sorted now this morning. Astrid is in a funny state now where it’ll likely blow up easily, but the edges around the new interfaces are mostly smooth.
The lifecycle is similar, but notably:
- aquire/release semantics only need a reference to the session, a handle to an empty resource struct, and a name
- for getting and setting the caller must know everything about the resource up front: in other words type & size with a void pointer to a valid memory space
- internally get/set just wraps aquire/release (except not fully yet, which is why things are still in a bit of a weird state!)
- all objects big and small are registered in LMDB as a resource header. the small ones also store their values directly in the header.
- that last bit allows get to be on a fast path: for small objects, reads can be completely non-blocking thanks to LMDB
- there are two types of locks: a session-wide lock used for LMDB writes (since the session is shared across all instruments) and each POSIX-backed object (large ones like buffers) has a lock