Expand description
Process-wide guest state: run flags, stack bootstrap, dyld image table.
Modules§
- dyld_
table - Runtime table of mapped guest dylibs for freestanding
dlopen/dlsym. - stack
- Minimal Darwin-ish process stack bootstrap (argc / argv / env / terminator).
Structs§
- Process
State - Owned process state for one guest (or unit-test isolation via reset).
Functions§
- bottle_
dirfd - Process-wide bottle root directory fd for
openat/fstatat(B1). - bottle_
root - Clone of the configured bottle root, if any.
- child_
born - Parent observed a successful
fork(child pid > 0). - child_
reaped - Parent reaped at least one child via
waitpid/wait4. - fd_
alloc - Allocates a guest FD slot for
host_fd(lock-free CAS scan). - fd_get
- Resolve guest FD → host FD without taking the process lock (I/O hot path).
- fd_
guest_ nonblock - Guest-visible
O_NONBLOCKforgfd(stdio or allocated slot). - fd_
guest_ path - Guest path for
gfd, if recorded at open. - fd_
install - Installs
host_fdinto a specific guest FD slot (fordup2). - fd_
is_ tls - True when
gfdis a TLS-wrapped guest FD (hot path; no mutex). - fd_
set_ guest_ nonblock - Sets guest-visible
O_NONBLOCKforgfd. - fd_
set_ guest_ path - Record the guest path used to open
gfd(absolute Darwin path). - fd_
set_ tls - Mark / clear TLS session association for
gfd(paired withcrate::tls_fd). - fd_take
- Removes a guest FD mapping and returns the host fd (lock-free).
- guest_
executable_ path - Guest absolute executable path, if set for this run.
- live_
children - Number of unreaped host children (approximate; for pipe blocking heuristics).
- normalize_
stdio_ pipes_ blocking - Clear host
O_NONBLOCKon stdio when the fd is a pipe/FIFO. - reset_
run - Resets FD/signals/counters for a new guest run (keeps bottle root).
- set_
bottle_ root - Configures the bottle root used by path-taking syscalls.
- set_
guest_ executable_ path - Records the guest-visible main executable path for
_NSGetExecutablePath. - stdio_
mark_ open - Clear the closed bit for a stdio slot (after successful
dup2onto 0/1/2). - tick_
syscall - Bumps the process-wide syscall counter without taking the process lock.
- with_
bottle_ root - Borrow the bottle root without cloning (hot path for path translation).
- with_
mut - Exclusive access to the active process state.
- with_
ref - Shared access to the active process state (concurrent FD lookups, etc.).