Alexandre Julliard : server: Use the correct thread id to set affinity.

Alexandre Julliard julliard at winehq.org
Fri Nov 20 10:48:03 CST 2009


Module: wine
Branch: master
Commit: a764fe89212500b0ffa23fa9a9f699db89fd7d59
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a764fe89212500b0ffa23fa9a9f699db89fd7d59

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Nov 20 11:44:54 2009 +0100

server: Use the correct thread id to set affinity.

---

 server/thread.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/thread.c b/server/thread.c
index f45be24..b50193a 100644
--- a/server/thread.c
+++ b/server/thread.c
@@ -415,7 +415,7 @@ void set_thread_affinity( struct thread *thread, affinity_t affinity )
         return;
     }
 #ifdef HAVE_SCHED_SETAFFINITY
-    if (thread->unix_pid != -1)
+    if (thread->unix_tid != -1)
     {
         cpu_set_t set;
         int i;
@@ -425,7 +425,7 @@ void set_thread_affinity( struct thread *thread, affinity_t affinity )
         for (i = 0, mask = 1; mask; i++, mask <<= 1)
             if (affinity & mask) CPU_SET( i, &set );
 
-        if (!sched_setaffinity( thread->unix_pid, sizeof(set), &set ))
+        if (!sched_setaffinity( thread->unix_tid, sizeof(set), &set ))
             thread->affinity = affinity;
         else
             file_set_error();




More information about the wine-cvs mailing list