SPA_API_CPU constchar *spa_cpu_vm_type_to_string(uint32_t vm_type)
{ switch(vm_type) { case SPA_CPU_VM_NONE: return NULL; case SPA_CPU_VM_KVM: return"kvm"; case SPA_CPU_VM_QEMU: return"qemu"; case SPA_CPU_VM_BOCHS: return"bochs"; case SPA_CPU_VM_XEN: return"xen"; case SPA_CPU_VM_UML: return"uml"; case SPA_CPU_VM_VMWARE: return"vmware"; case SPA_CPU_VM_ORACLE: return"oracle"; case SPA_CPU_VM_MICROSOFT: return"microsoft"; case SPA_CPU_VM_ZVM: return"zvm"; case SPA_CPU_VM_PARALLELS: return"parallels"; case SPA_CPU_VM_BHYVE: return"bhyve"; case SPA_CPU_VM_QNX: return"qnx"; case SPA_CPU_VM_ACRN: return"acrn"; case SPA_CPU_VM_POWERVM: return"powervm"; case SPA_CPU_VM_OTHER: return"other"; default: return"unknown";
}
}
/** *methods
*/ struct spa_cpu_methods { /** the version of the methods. This can be used to expand this
structure in the future */ #define SPA_VERSION_CPU_METHODS 2
uint32_t version;
/** get CPU flags */
uint32_t (*get_flags) (void *object);
/** force CPU flags, use SPA_CPU_FORCE_AUTODETECT to autodetect CPU flags */ int (*force_flags) (void *object, uint32_t flags);
/** get number of CPU cores */
uint32_t (*get_count) (void *object);
/** get maximum required alignment of data */
uint32_t (*get_max_align) (void *object);
/* check if running in a VM. Since:1 */
uint32_t (*get_vm_type) (void *object);
/* denormals will be handled as zero, either with FTZ or DAZ.
* Since:2 */ int (*zero_denormals) (void *object, bool enable);
};
/** keys can be given when initializing the cpu handle */ #define SPA_KEY_CPU_FORCE "cpu.force"/**< force cpu flags */ #define SPA_KEY_CPU_VM_TYPE "cpu.vm.type"/**< force a VM type */ #define SPA_KEY_CPU_ZERO_DENORMALS "cpu.zero.denormals"/**< zero denormals */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.