Playbit Runtime
#include <playbit/sys/sys.h> defines the runtime interface used by guest programs.
The Playbit runtime is capability-based:
- Guest code interacts with host resources through
PBSysHandlevalues. - Rights (
PBSysRights) are attached to handles. - Every handle points to a runtime object (
PBSysObjectType). - Signals and events are used for async coordination.
Read more in "Capabilities"
Startup and execution
Main-thread startup is:
- Guest calls
PBSysThreadEnterMain(flags). - Native guest calls
PBSysNativeMain(entry, arg1, arg2, configurator). - Host runtime invokes guest
pb_thread(...)on each runtime thread. - Guest code performs syscalls (
pb_syscall,pb_syscall_async) and polls events (PBSysEventPoll).
See ABI for exact call boundaries.
Event delivery
There is no host-to-guest callback pair in the current API.
Guests pull events using PBSysEventPoll into a variable-size event buffer.
See System events.
Runtime reference
- API reference (markdown)
- ABI
- System calls
- Types
- System events
- Objects and capabilities
- Platform status
You can also read the entire combined Playbit API reference on a single page