[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [libvirt-perl PATCH] Add virDomainAddIOThread and virDomainDelIOThread support



Add support for the new IOThread APIs

Signed-off-by: John Ferlan <jferlan redhat com>
---
 Changes                |  1 +
 Virt.xs                | 20 ++++++++++++++++++++
 lib/Sys/Virt/Domain.pm | 12 ++++++++++++
 3 files changed, 33 insertions(+)

diff --git a/Changes b/Changes
index ead8f8e..58efa37 100644
--- a/Changes
+++ b/Changes
@@ -6,6 +6,7 @@ Revision history for perl module Sys::Virt
    event callback & constants.
  - Add JOB_DOWNTIME_NET constant
  - Add JOB_TIME_ELAPSED_NET constant
+ - Add virDomainAddIOThread and virDomainDelIOThread API bindings
 
 1.2.14 2015-04-09
 
diff --git a/Virt.xs b/Virt.xs
index debb8f4..29f20ec 100644
--- a/Virt.xs
+++ b/Virt.xs
@@ -5100,6 +5100,26 @@ PREINIT:
          _croak_error();
 
 
+void
+add_iothread(dom, iothread_id, flags=0)
+     virDomainPtr dom;
+     unsigned int iothread_id;
+     unsigned int flags;
+ PPCODE:
+     if (virDomainAddIOThread(dom, iothread_id, flags) < 0)
+         _croak_error();
+
+
+void
+del_iothread(dom, iothread_id, flags=0)
+     virDomainPtr dom;
+     unsigned int iothread_id;
+     unsigned int flags;
+ PPCODE:
+     if (virDomainDelIOThread(dom, iothread_id, flags) < 0)
+         _croak_error();
+
+
 int
 num_of_snapshots(dom, flags=0)
       virDomainPtr dom;
diff --git a/lib/Sys/Virt/Domain.pm b/lib/Sys/Virt/Domain.pm
index f12abd1..2fda74d 100644
--- a/lib/Sys/Virt/Domain.pm
+++ b/lib/Sys/Virt/Domain.pm
@@ -1237,6 +1237,18 @@ Pin the IOThread given by index C<$iothread> to physical CPUs
 given by C<$mask>. The C<$mask> is a string representing a bitmask
 against physical CPUs, 8 cpus per character.
 
+=item $dom->add_iothread($iothread, $flags=0)
+
+Add a new IOThread by the C<$iothread> value to the guest domain.
+The C<$flags> parameter accepts one or more the CONFIG OPTION constants
+documented later, and defaults to 0 if omitted.
+
+=item $dom->del_iothread($iothread, $flags=0)
+
+Delete an existing IOThread by the C<$iothread> value from the guest domain.
+The C<$flags> parameter accepts one or more the CONFIG OPTION constants
+documented later, and defaults to 0 if omitted.
+
 =item my @stats = $dom->get_cpu_stats($startCpu, $numCpus, $flags=0)
 
 Requests the guests host physical CPU usage statistics, starting
-- 
2.1.0


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]