mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
Introduce annotations for virLXCDriverPtr fields
Annotate the fields in virLXCDriverPtr to indicate the locking rules for their use.
This commit is contained in:
parent
29bed27eb4
commit
4deeb74d01
@ -67,30 +67,44 @@ struct _virLXCDriverConfig {
|
|||||||
struct _virLXCDriver {
|
struct _virLXCDriver {
|
||||||
virMutex lock;
|
virMutex lock;
|
||||||
|
|
||||||
|
/* Require lock to get reference on 'config',
|
||||||
|
* then lockless thereafter */
|
||||||
virLXCDriverConfigPtr config;
|
virLXCDriverConfigPtr config;
|
||||||
|
|
||||||
|
/* Require lock while using. Unsafe. XXX */
|
||||||
virCapsPtr caps;
|
virCapsPtr caps;
|
||||||
|
|
||||||
|
|
||||||
|
/* Immutable pointer, Immutable object */
|
||||||
virDomainXMLOptionPtr xmlopt;
|
virDomainXMLOptionPtr xmlopt;
|
||||||
|
|
||||||
|
/* Immutable pointer, lockless APIs*/
|
||||||
virSysinfoDefPtr hostsysinfo;
|
virSysinfoDefPtr hostsysinfo;
|
||||||
|
|
||||||
|
/* Atomic inc/dec only */
|
||||||
unsigned int nactive;
|
unsigned int nactive;
|
||||||
|
|
||||||
|
/* Immutable pointers. Caller must provide locking */
|
||||||
virStateInhibitCallback inhibitCallback;
|
virStateInhibitCallback inhibitCallback;
|
||||||
void *inhibitOpaque;
|
void *inhibitOpaque;
|
||||||
|
|
||||||
|
/* Immutable pointer, self-locking APIs */
|
||||||
virDomainObjListPtr domains;
|
virDomainObjListPtr domains;
|
||||||
|
|
||||||
|
/* Immutable pointer. Requires lock to be held before
|
||||||
|
* calling APIs. */
|
||||||
virUSBDeviceListPtr activeUsbHostdevs;
|
virUSBDeviceListPtr activeUsbHostdevs;
|
||||||
|
|
||||||
|
/* Immutable pointer, self-locking APIs */
|
||||||
virDomainEventStatePtr domainEventState;
|
virDomainEventStatePtr domainEventState;
|
||||||
|
|
||||||
|
/* Immutable pointer. self-locking APIs */
|
||||||
virSecurityManagerPtr securityManager;
|
virSecurityManagerPtr securityManager;
|
||||||
|
|
||||||
/* Mapping of 'char *uuidstr' -> virConnectPtr
|
/* Mapping of 'char *uuidstr' -> virConnectPtr
|
||||||
* of guests which will be automatically killed
|
* of guests which will be automatically killed
|
||||||
* when the virConnectPtr is closed*/
|
* when the virConnectPtr is closed.
|
||||||
|
* Immutable pointer. Unsafe APIs. XXX */
|
||||||
virHashTablePtr autodestroy;
|
virHashTablePtr autodestroy;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user