+template <template <typename> class Atom>
+void run_wake_blocked_test() {
+ for (auto delay = std::chrono::milliseconds(1);; delay *= 2) {
+ bool success = false;
+ Futex<Atom> f(0);
+ auto thr = DSched::thread([&] { success = f.futexWait(0); });
+ /* sleep override */ std::this_thread::sleep_for(delay);
+ f.store(1);
+ f.futexWake(1);
+ DSched::join(thr);
+ LOG(INFO) << "delay=" << delay.count() << "_ms, success=" << success;
+ if (success) {
+ break;
+ }
+ }
+}
+