From 189ed5d80619a1ac87718c171fc6aa937b34457d Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Thu, 3 Jan 2019 23:43:20 -0500 Subject: [PATCH] freebsd_iflib: Get the thread_id from the thread* indirectly. This is needed on 64-bit. --- src/libs/compat/freebsd_iflib/kthread.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libs/compat/freebsd_iflib/kthread.cpp b/src/libs/compat/freebsd_iflib/kthread.cpp index c60ebe2a26..8ec24d901d 100644 --- a/src/libs/compat/freebsd_iflib/kthread.cpp +++ b/src/libs/compat/freebsd_iflib/kthread.cpp @@ -36,14 +36,16 @@ kthread_add(void (*func)(void *), void *arg, void* p, void sched_prio(struct thread* td, u_char prio) { - set_thread_priority((thread_id)td, prio); + uintptr_t tdi = (uintptr_t)td; + set_thread_priority((thread_id)tdi, prio); } void sched_add(struct thread* td, int /* flags */) { - resume_thread((thread_id)td); + uintptr_t tdi = (uintptr_t)td; + resume_thread((thread_id)tdi); }