| 2089 | return do_thread_migrate(th, v); |
| 2090 | } |
| 2091 | static int do_thread_migrate(thread* th, vcpu_base* vb) { |
| 2092 | assert(vb != th->vcpu); |
| 2093 | AtomicRunQ().remove_from_list(th); |
| 2094 | th->get_vcpu()->nthreads--; |
| 2095 | th->state = STANDBY; |
| 2096 | auto vcpu = (vcpu_t*)vb; |
| 2097 | th->vcpu = vcpu; |
| 2098 | vcpu->nthreads++; |
| 2099 | vcpu->move_to_standbyq_atomic(th); |
| 2100 | return 0; |
| 2101 | } |
| 2102 | |
| 2103 | static std::atomic<uint32_t> _n_vcpu{0}; |
| 2104 | uint32_t get_vcpu_num() { |
no test coverage detected