From: Azat Khuzhin Date: Mon, 13 Jan 2020 21:38:06 +0000 (+0300) Subject: test: fix dst thread in move_pthread_to_realtime_scheduling_class (osx) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=10504fcab927e8b226ef2e988b1b3f175c3e9f71;p=libevent test: fix dst thread in move_pthread_to_realtime_scheduling_class (osx) Fixes the following tests on osx: - del_wait - no_events Refs: #940 --- diff --git a/test/regress_thread.c b/test/regress_thread.c index 312f985c..d1ba52ed 100644 --- a/test/regress_thread.c +++ b/test/regress_thread.c @@ -92,7 +92,7 @@ static void move_pthread_to_realtime_scheduling_class(pthread_t pthread) policy.constraint = (uint32_t)(10 * clock2abs); policy.preemptible = FALSE; - int kr = thread_policy_set(pthread_mach_thread_np(pthread_self()), + int kr = thread_policy_set(pthread_mach_thread_np(pthread), THREAD_TIME_CONSTRAINT_POLICY, (thread_policy_t)&policy, THREAD_TIME_CONSTRAINT_POLICY_COUNT);