Documentation ¶
Index ¶
Constants ¶
const (
DOMID_SELF = 0x7FF0
)
Variables ¶
This section is empty.
Functions ¶
func MemoryBarrierWrite ¶
func MemoryBarrierWrite()
MemoryBarrierWrite issues a write memory barrier.
Types ¶
type EventChannel ¶
type EventChannel struct {
Port uint32
}
func NewEventChannel ¶
func NewEventChannel(remote uint32) *EventChannel
func (*EventChannel) Notify ¶
func (ec *EventChannel) Notify()
func (*EventChannel) Wait ¶
func (ec *EventChannel) Wait()
type FrontendRing ¶
type FrontendRing struct { RequestProducer uint32 ResponseConsumer uint32 EntrySize uint32 EntryCount uint32 }
FrontendRing provides the frontend interface to a SharedRing.
func NewFrontendRing ¶
func NewFrontendRing(r *SharedRing, entrySize int) *FrontendRing
NewFrontendRing initializes a new FrontendRing from the provided SharedRing.
entrySize should be the size in bytes of the largest value to be stored in the ring.
func (*FrontendRing) CheckForResponses ¶
func (r *FrontendRing) CheckForResponses() (more bool)
CheckForResponses checks for unconsumed responses, returning true if there is more work to do.
When there is no more work to do, it notifies the backend that all responses have been consumed.
func (*FrontendRing) NextRequest ¶
func (r *FrontendRing) NextRequest() unsafe.Pointer
NextRequest returns a pointer to the next request, advancing the private producer index.
func (*FrontendRing) NextResponse ¶
func (r *FrontendRing) NextResponse() unsafe.Pointer
NextResponse returns a pointer to the next response, advancing the private consumer index.
func (*FrontendRing) PushRequests ¶
func (r *FrontendRing) PushRequests() (notify bool)
PushRequests updates the shared ring so the backend sees all pending requests.
If notify is true, the backend expects to receive an event channel notification.
type GrantTable ¶
type GrantTable struct { Entries []GrantTableEntry // contains filtered or unexported fields }
func MapGrantTable ¶
func MapGrantTable() *GrantTable
MapGrantTable maps Xen's shared grant table into memory and returns a pointer to it.
func (*GrantTable) EndAccess ¶
func (t *GrantTable) EndAccess(gref Gref) bool
func (*GrantTable) GrantAccess ¶
type GrantTableEntry ¶
GrantTableEntry is the V2 grant table entry structure for full pages.
type SharedRing ¶
type SharedRing struct { byte // contains filtered or unexported fields }Data [3584]
SharedRing is a shared-memory producer-consumer ring.
It's memory layout is precise, and should be accessed through FrontendRing.