make sure threadobject->tid has always a non-zero value
authormotse <none@none>
Sat, 30 Oct 2004 11:26:00 +0000 (11:26 +0000)
committermotse <none@none>
Sat, 30 Oct 2004 11:26:00 +0000 (11:26 +0000)
src/threads/native/threads.c
threads/nativethread.c

index 48e98a715a38f4a8061edaf10b983d5fc6eeb1da..897f821e0856dbb78d5ef80fe3d2a7b0adfe1667 100644 (file)
@@ -593,6 +593,7 @@ static void *threadstartup(void *t)
        sem_post(psem);
 
        setPriority(info->tid, thread->o.thread->priority);
+       sched_yield();
 
        /* Find the run()V method and call it */
        method = class_resolveclassmethod(thread->o.header.vftbl->class,
index 48e98a715a38f4a8061edaf10b983d5fc6eeb1da..897f821e0856dbb78d5ef80fe3d2a7b0adfe1667 100644 (file)
@@ -593,6 +593,7 @@ static void *threadstartup(void *t)
        sem_post(psem);
 
        setPriority(info->tid, thread->o.thread->priority);
+       sched_yield();
 
        /* Find the run()V method and call it */
        method = class_resolveclassmethod(thread->o.header.vftbl->class,