From owner-freebsd-java Tue Dec 11 15:13:46 2001 Delivered-To: freebsd-java@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id 7C71637B405 for ; Tue, 11 Dec 2001 15:13:43 -0800 (PST) Received: (from eischen@localhost) by pcnet1.pcnet.com (8.12.1/8.12.1) id fBBNCbMs029889; Tue, 11 Dec 2001 18:12:37 -0500 (EST) Date: Tue, 11 Dec 2001 18:12:37 -0500 (EST) From: Daniel Eischen To: Bill Huey Cc: Nate Williams , absinthe@pobox.com, shanon loveridge , freebsd-java@FreeBSD.ORG Subject: Re: Pthreads bug fix [was Re: jdk1.3.1p5] In-Reply-To: <20011211223318.GB2002@gnuppy> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Tue, 11 Dec 2001, Bill Huey wrote: > On Tue, Dec 11, 2001 at 08:18:47AM -0500, Daniel Eischen wrote: > > Yes, it is ;-). Please don't let anything like this get committed > > without giving me a chance to deuglify it :-) :-) > > Oh, no, it's definitely not ready for CVS commit. It's definitely pure > super-slop, but I needed to at least get it out so that folks that are > responsible for the pthreads system can look at the logic and possibly > reimplement it in the style and manner it's expected to be. > > Uh, > > 1) The timespec stuff seems ok since it cleans up the useage of it and > treats it properly a vector with associated add/substract > operations instead of just inserting random logic at those > points. The might be a good style > change for that part of the library. I think there are already macros to handle timespec add and subtract, but they are not visible outside of the kernel (hidden behind #ifdef _KERNEL). > 2) The state_log stuff was essential for me to track down the bug in the > first place and it's up to you whether you'd like to keep it in > or not. It's sloppily pieced together at this point and I'm not > in a place where I really care about that as much as just trying > to get it and the JVM to work correctly in the first place. I'd rather get rid of it. > 3) The waiting queue recalculation stuff seems to be logically ok, but > was also sloppily glued together. I only marginally care for the > same reason as above. ;-) Not sure why this is needed. In general, wait times are in absolute times and blocking conditions internal to the threads library should be able to handle errant wakeups (so they don't return to the caller). This is essential for signal handling to work properly. If a thread waiting on a mutex or condition variable has to handle a signal, it needs to dequeue itself from the mutex/cv queue, run the signal handler, and then it returns to the mutex or cv routine (which detects the errant wakeup, requeues the thread, and calls the scheduler to block and schedule another thread again). > In summary, I'm basically lazy and would like you to fix all the > problems with it. ;-) That didn't look like a patch to -current libc_r; was it? -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message