| 32 | class SpinLockTest : public ::testing::Test { |
| 33 | protected: |
| 34 | void SetUp() override { |
| 35 | shared_counter = 0; |
| 36 | thread_counter = 0; |
| 37 | |
| 38 | // 初始化环境层 |
| 39 | env_state_.InitializeCores(8); // 支持多核测试(最多 8 核) |
| 40 | env_state_.SetCurrentThreadEnvironment(); |
| 41 | env_state_.BindThreadToCore(std::this_thread::get_id(), 0); |
| 42 | } |
| 43 | |
| 44 | void TearDown() override { |
| 45 | // 清理环境 |
nothing calls this directly
no test coverage detected