Setting custom field in struct thread from bhyverun code

Stefan Andritoiu stefan.andritoiu at gmail.com
Fri Jun 5 17:23:41 UTC 2015


I've added a new field to struct thread and want to set it's value
when the VCPU thread is created. I need this new field in the ULE
scheduler.
My plan was this: in the fbsdrun_start_thread() function make a
custom-ioctl call {ioctl(ctx->fd, VM_SET_CUSTOM, ..)} to set it. But I
have no idea how to get the thread I need, to set it's value.
How can I get the thread? Or is there a better way of setting, a
VCPU-thread's field, at the moment the thread is created, to use it in
the scheduler?


More information about the freebsd-virtualization mailing list