From owner-freebsd-arch Wed Nov 3 8:32: 5 1999 Delivered-To: freebsd-arch@freebsd.org Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (Postfix) with ESMTP id 63D671506B for ; Wed, 3 Nov 1999 08:32:00 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.3/8.9.3) with ESMTP id RAA13313 for ; Wed, 3 Nov 1999 17:31:56 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id RAA87806 for freebsd-arch@freebsd.org; Wed, 3 Nov 1999 17:31:55 +0100 (MET) Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id EC2111506B for ; Wed, 3 Nov 1999 08:29:54 -0800 (PST) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.3/8.9.3) with ESMTP id IAA02774; Wed, 3 Nov 1999 08:28:16 -0800 (PST) (envelope-from jdp@polstra.com) Received: (from jdp@localhost) by vashon.polstra.com (8.9.3/8.9.1) id IAA48687; Wed, 3 Nov 1999 08:28:15 -0800 (PST) (envelope-from jdp@polstra.com) Message-ID: X-Mailer: XFMail 1.3 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <199911031503.IAA08453@mt.sri.com> Date: Wed, 03 Nov 1999 08:28:15 -0700 (PST) Organization: Polstra & Co., Inc. From: John Polstra To: Nate Williams Subject: Re: Threads models and FreeBSD. (Next Step) Cc: arch@freebsd.org Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Nate Williams wrote: >> >> I've just been looking at the paper, and I don't think they modified >> the compiler or the assembler. What they say is: >> >> We do this by delimiting, with special assembler labels, each >> critical section in the C source code for the user-level thread >> package; we then post-process the compiler-generated assembly >> code to make the copy. > > Correct, but right after that, they stated that instead of having to > specially annotate critical sections with assembler labels, it could be > picked up automatically with the use of a modified compiler/assembler. It could be done that way, but it doesn't need to be. > Also, either way requires that the program be written in C/C++, > which is unacceptable to me (and you I suspect), since some of my > 'threaded' programs won't be written in C (Java) and you (Modula-3). > These 'critical sections' will exist in Java, and I don't want to > re-write the JVM to go figure out what sections are critical and > have it build assembly versions. No, they say "each critical section in the C source code -->>> for the user-level thread package <<<--". They don't do anything special to application programs. They only mess with the threads kernel (src/lib/libc_r/uthread/uthread_kern.c) itself. It boils down to surrounding certain small sections of code in libc_r with __pthread_begin_critical(); [...] __pthread_end_critical(); (Pick your favorite name for the macros.) John --- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "No matter how cynical I get, I just can't keep up." -- Nora Ephron To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message