Changeset View
Changeset View
Standalone View
Standalone View
lib/libvmmapi/vmmapi.h
Context not available. | |||||
int vm_suspended_cpus(struct vmctx *ctx, cpuset_t *cpus); | int vm_suspended_cpus(struct vmctx *ctx, cpuset_t *cpus); | ||||
int vm_activate_cpu(struct vmctx *ctx, int vcpu); | int vm_activate_cpu(struct vmctx *ctx, int vcpu); | ||||
/* CPU topology */ | |||||
int vm_set_topology(struct vmctx *ctx, uint16_t sockets, uint16_t cores, | |||||
uint16_t threads, uint16_t maxcpus); | |||||
int vm_get_topology(struct vmctx *ctx, uint16_t *sockets, uint16_t *cores, | |||||
uint16_t *threads, uint16_t *maxcpus); | |||||
/* | /* | ||||
grehan: The type for these should be uin16_t - there is no need for it to be a 64-bit type. | |||||
Done Inline ActionsWhen I started on this task you told me to be QEMU compatible, so I did that, I looked at QEMU both for syntax and data types: if (opts) { unsigned cpus = qemu_opt_get_number(opts, "cpus", 0); unsigned sockets = qemu_opt_get_number(opts, "sockets", 0); unsigned cores = qemu_opt_get_number(opts, "cores", 0); unsigned threads = qemu_opt_get_number(opts, "threads", 0); We usually express "unsigned" as uint64_t in the kernel, are rgrimes: When I started on this task you told me to be QEMU compatible, so I did that, I looked at QEMU… | |||||
Done Inline Actions"unsigned" would correspond to uint32_t, but there is no point in even using something that size so I prefer uint16_t. grehan: "unsigned" would correspond to uint32_t, but there is no point in even using something that… | |||||
Done Inline ActionsMy mistake, I was thinking the sizeof(int) on amd64 would be 8 not 4. I'll change all the types to uint16_t. rgrimes: My mistake, I was thinking the sizeof(int) on amd64 would be 8 not 4. I'll change all the… | |||||
* FreeBSD specific APIs | * FreeBSD specific APIs | ||||
*/ | */ | ||||
Context not available. |
The type for these should be uin16_t - there is no need for it to be a 64-bit type.