From d3d2b044c34cac2bd897629548cef3b4cbcde7c4 Mon Sep 17 00:00:00 2001 From: motse Date: Sat, 30 Oct 2004 11:26:00 +0000 Subject: [PATCH] make sure threadobject->tid has always a non-zero value --- src/threads/native/threads.c | 1 + threads/nativethread.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/threads/native/threads.c b/src/threads/native/threads.c index 48e98a715..897f821e0 100644 --- a/src/threads/native/threads.c +++ b/src/threads/native/threads.c @@ -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, diff --git a/threads/nativethread.c b/threads/nativethread.c index 48e98a715..897f821e0 100644 --- a/threads/nativethread.c +++ b/threads/nativethread.c @@ -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, -- 2.25.1