OSDN Git Service

Read thread priority as an int, not a boolean.
authorAndy McFadden <fadden@android.com>
Fri, 7 Aug 2009 21:49:40 +0000 (14:49 -0700)
committerAndy McFadden <fadden@android.com>
Fri, 7 Aug 2009 21:49:40 +0000 (14:49 -0700)
We were using the wrong field get function.  After our change to
stdbool.h, the thread priority was always 0 or 1.

vm/Thread.c

index db64256..30c3523 100644 (file)
@@ -1569,7 +1569,7 @@ static void* interpThreadStart(void* arg)
      * setPriority(), and then starts the thread.  We could manage this with
      * a "needs priority update" flag to avoid the redundant call.
      */
-    int priority = dvmGetFieldBoolean(self->threadObj,
+    int priority = dvmGetFieldInt(self->threadObj,
                         gDvm.offJavaLangThread_priority);
     dvmChangeThreadPriority(self, priority);