static void wait_for_rings_started(TestServer *s, size_t count) { gint64 end_time; g_mutex_lock(&s->data_mutex); end_time = g_get_monotonic_time() + 5 * G_TIME_SPAN_SECOND; while (ctpop64(s->rings) != count) { if (!g_cond_wait_until(&s->data_cond, &s->data_mutex, end_time)) { /* timeout has passed */ g_assert_cmpint(ctpop64(s->rings), ==, count); break; } }
uint64_t HELPER(ctpop_i64)(uint64_t arg) { return ctpop64(arg); }
target_ulong helper_popc(target_ulong val) { return ctpop64(val); }