From owner-freebsd-java Wed Dec 12 22:32:27 2001 Delivered-To: freebsd-java@freebsd.org Received: from gnuppy.monkey.org (cx739861-a.dt1.sdca.home.com [24.5.164.61]) by hub.freebsd.org (Postfix) with ESMTP id 4744237B416 for ; Wed, 12 Dec 2001 22:32:24 -0800 (PST) Received: from billh by gnuppy.monkey.org with local (Exim 3.33 #1 (Debian)) id 16EPPb-0001us-00; Wed, 12 Dec 2001 22:32:07 -0800 Date: Wed, 12 Dec 2001 22:32:07 -0800 To: Daniel Eischen Cc: Bill Huey , freebsd-java@FreeBSD.ORG Subject: Re: Pthreads bug fix [was Re: jdk1.3.1p5] Message-ID: <20011213063207.GA7359@gnuppy> References: <20011212074342.GB4677@gnuppy> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.24i From: Bill Huey Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, Dec 12, 2001 at 07:24:12AM -0500, Daniel Eischen wrote: > > > diff -u -r1.38 uthread_kern.c > > > --- uthread_kern.c 4 May 2001 20:37:07 -0000 1.38 > > > +++ uthread_kern.c 12 Dec 2001 04:15:35 -0000 > > > @@ -387,6 +387,10 @@ > > > ((pthread->wakeup_time.tv_sec == ts.tv_sec) && > > > (pthread->wakeup_time.tv_nsec <= ts.tv_nsec)))) { > > > switch (pthread->state) { > > > + case PS_SUSPENDED: > > > + PTHREAD_WAITQ_REMOVE(pthread); > > > + pthread->suspended = SUSP_YES; > > > + break; > > > case PS_POLL_WAIT: > > > case PS_SELECT_WAIT: > > > /* Return zero file descriptors ready: */ > > > Dan Eischen > > Yes, this should keep the state equal to PS_SUSPENDED. When the thread > is resumed, its state should be set to PS_RUNNING and then it will be > added back to the run queue. This didn't work. A thread would SEGV and then the entire thing blows up shortly afterward in a wierd kind of delayed signal delivery way. bill To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message