daemon: Move TLS initialization to virInitialize
[libvirt/zwu.git] / docs / api_extension / 0002-add-new-public-API.patch
blobdf93440a31e4f24688f8c686b6bf80eaf51c0027
1 From ea3f5c68093429c6ad507b45689cdf209c2c257b Mon Sep 17 00:00:00 2001
2 From: Eric Blake <eblake@redhat.com>
3 Date: Fri, 24 Sep 2010 16:48:45 -0600
4 Subject: [PATCH 02/15] vcpu: add new public API
6 API agreed on in
7 https://www.redhat.com/archives/libvir-list/2010-September/msg00456.html,
8 but modified for enum names to be consistent with virDomainDeviceModifyFlags.
10 * include/libvirt/libvirt.h.in (virDomainVcpuFlags)
11 (virDomainSetVcpusFlags, virDomainGetVcpusFlags): New
12 declarations.
13 * src/libvirt_public.syms: Export new symbols.
14 ---
15 include/libvirt/libvirt.h.in | 15 +++++++++++++++
16 src/libvirt_public.syms | 2 ++
17 2 files changed, 17 insertions(+), 0 deletions(-)
19 diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
20 index 2eba61e..d0cc4c0 100644
21 --- a/include/libvirt/libvirt.h.in
22 +++ b/include/libvirt/libvirt.h.in
23 @@ -915,8 +915,23 @@ struct _virVcpuInfo {
25 typedef virVcpuInfo *virVcpuInfoPtr;
27 +/* Flags for controlling virtual CPU hot-plugging. */
28 +typedef enum {
29 + /* Must choose at least one of these two bits; SetVcpus can choose both */
30 + VIR_DOMAIN_VCPU_LIVE = (1 << 0), /* Affect active domain */
31 + VIR_DOMAIN_VCPU_CONFIG = (1 << 1), /* Affect next boot */
33 + /* Additional flags to be bit-wise OR'd in */
34 + VIR_DOMAIN_VCPU_MAXIMUM = (1 << 2), /* Max rather than current count */
35 +} virDomainVcpuFlags;
37 int virDomainSetVcpus (virDomainPtr domain,
38 unsigned int nvcpus);
39 +int virDomainSetVcpusFlags (virDomainPtr domain,
40 + unsigned int nvcpus,
41 + unsigned int flags);
42 +int virDomainGetVcpusFlags (virDomainPtr domain,
43 + unsigned int flags);
45 int virDomainPinVcpu (virDomainPtr domain,
46 unsigned int vcpu,
47 diff --git a/src/libvirt_public.syms b/src/libvirt_public.syms
48 index fceb516..a8091b1 100644
49 --- a/src/libvirt_public.syms
50 +++ b/src/libvirt_public.syms
51 @@ -409,6 +409,8 @@ LIBVIRT_0.8.5 {
52 global:
53 virDomainSetMemoryParameters;
54 virDomainGetMemoryParameters;
55 + virDomainGetVcpusFlags;
56 + virDomainSetVcpusFlags;
57 } LIBVIRT_0.8.2;
59 # .... define new API here using predicted next version number ....
60 --
61 1.7.2.3