| 28 | } |
| 29 | |
| 30 | void CompNodeImplHelper::EventImplHelper::host_wait() { |
| 31 | if (sm_cpu_sync_level >= 2) { |
| 32 | while (!finished()) |
| 33 | ; |
| 34 | return; |
| 35 | } |
| 36 | if (sm_cpu_sync_level >= 1) { |
| 37 | #if __DEPLOY_ON_XP_SP2__ |
| 38 | #if MGB_HAVE_THREAD |
| 39 | __builtin_trap(); |
| 40 | #else |
| 41 | return; |
| 42 | #endif |
| 43 | #else |
| 44 | while (!finished()) { |
| 45 | std::this_thread::yield(); |
| 46 | } |
| 47 | #endif |
| 48 | return; |
| 49 | } |
| 50 | mgb_assert(!sm_cpu_sync_level, "invalid cpu sync level: %d", sm_cpu_sync_level); |
| 51 | |
| 52 | host_wait_cv(); |
| 53 | } |
| 54 | |
| 55 | void CompNodeImplHelper::EventImplHelper::host_wait_cv() { |
| 56 | #if __DEPLOY_ON_XP_SP2__ |
no outgoing calls