mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
golang/xenlight: add SendTrigger wrapper
Add a warpper around libxl_send_trigger. Signed-off-by: Nick Rosbrook <rosbrookn@ainfosec.com> Reviewed-by: George Dunlap <george.dunlap@citrix.com>
This commit is contained in:
1 parent
9b6d865e0a
commit
1d95fd75df
1 file changed
+11
@@ -1282,3 +1282,14 @@ func (ctx *Context) DomainDestroy(domid Domid) error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// SendTrigger sends a Trigger to the domain specified by domid.
|
||||
func (ctx *Context) SendTrigger(domid Domid, trigger Trigger, vcpuid int) error {
|
||||
ret := C.libxl_send_trigger(ctx.ctx, C.uint32_t(domid),
|
||||
C.libxl_trigger(trigger), C.uint32_t(vcpuid), nil)
|
||||
if ret != 0 {
|
||||
return Error(ret)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||