| 738 | static void spinlock_unlock(void* m_); |
| 739 | |
| 740 | inline void prepare_switch(thread* from, thread* to) { |
| 741 | assert(from->vcpu == to->vcpu); |
| 742 | assert(to->state == states::RUNNING); |
| 743 | auto& cnt = to->get_vcpu()->switch_count; |
| 744 | (*(uint64_t*)&cnt)++; // increment of volatile variable is deprecated |
| 745 | } |
| 746 | |
| 747 | #pragma GCC diagnostic push |
| 748 | #pragma GCC diagnostic ignored "-Winvalid-offsetof" |
no test coverage detected