[haiku-commits] haiku: hrev52709 - src/libs/compat/freebsd_iflib

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 3 Jan 2019 23:45:13 -0500 (EST)

hrev52709 adds 1 changeset to branch 'master'
old head: 3a031789fe326a2896c8cbc8596fc03428186c7c
new head: 189ed5d80619a1ac87718c171fc6aa937b34457d
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=189ed5d80619+%5E3a031789fe32

----------------------------------------------------------------------------

189ed5d80619: freebsd_iflib: Get the thread_id from the thread* indirectly.
  
  This is needed on 64-bit.

                              [ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev52709
Commit:      189ed5d80619a1ac87718c171fc6aa937b34457d
URL:         https://git.haiku-os.org/haiku/commit/?id=189ed5d80619
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Fri Jan  4 04:43:20 2019 UTC

----------------------------------------------------------------------------

1 file changed, 4 insertions(+), 2 deletions(-)
src/libs/compat/freebsd_iflib/kthread.cpp | 6 ++++--

----------------------------------------------------------------------------

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);
 }
 
 


Other related posts: