]> granicus.if.org Git - libevent/commitdiff
test: fix dst thread in move_pthread_to_realtime_scheduling_class (osx)
authorAzat Khuzhin <azat@libevent.org>
Mon, 13 Jan 2020 21:38:06 +0000 (00:38 +0300)
committerAzat Khuzhin <azat@libevent.org>
Mon, 13 Jan 2020 23:07:22 +0000 (02:07 +0300)
Fixes the following tests on osx:
- del_wait
- no_events

Refs: #940

test/regress_thread.c

index 312f985c0ba3d8ed9aa831a531d057493007cfea..d1ba52ed975b0855bea53faf29f1bc31080040fb 100644 (file)
@@ -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);