twizzler-operating-system / twizzler

The Twizzler Operating System
BSD 3-Clause "New" or "Revised" License
66 stars 14 forks source link

Add utility types and functions for low-level interfacing between compartments #198

Closed dbittman closed 3 weeks ago

dbittman commented 4 weeks ago

This PR adds two low-level types for interfacing between compartments: SimpleBuffer and the Handle interface.

The simple buffer allows compartments to communicate simple bytes to each other, using Twizzler objects as shared memory. This is useful for e.g. the logger. The Handle interface allows programmers of services using secure gates to allow clients to open a handle to some server-side state that is automatically cleaned up when the handle is dropped or the compartment is unloaded.